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 calling
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 cas
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
met
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 ={
4 matches
Mail list logo