Re: get method inside class based view

2017-05-08 Thread Ismail Sarenkapic
Got it, thank you for very good explanation. понедељак, 08. мај 2017. 00.54.35 UTC+2, Vijay Khemlani је написао/ла: > > Assuming this view is for a path like > > http://example.com/shortener > > If you make a GET request to it (as in navigating to it in a browser) > it displays the form

Re: get method inside class based view

2017-05-07 Thread Vijay Khemlani
Assuming this view is for a path like http://example.com/shortener If you make a GET request to it (as in navigating to it in a browser) it displays the form calling the "get" method in the view. When you submit the form it usually does so to the same URL but with the POST method. So in this

Re: get method inside class based view

2017-05-07 Thread Daniel Roseman
On Sunday, 7 May 2017 17:21:10 UTC+1, Ismail Sarenkapic wrote: > > The question is, what is the purpose of get method here,when we have post > method > is it useless in this case?If not what is function of get method? > > Why would it be useless? The get method is for GET requests, the post

get method inside class based view

2017-05-07 Thread Ismail Sarenkapic
forms.py from django import forms from .validators import validate_url, validate_dot_com class SubmitUrlForm(forms.Form): url = forms.CharField( label='', validators=[validate_url], widget = forms.TextInput( attrs ={