The Django documentation says that a form is cleaned when calling 
is_valid():
https://docs.djangoproject.com/en/dev/ref/forms/validation/ (see first 
paragraph)


However, the is_valid soure code doesn't show that is does clean, as 
follows:

def is_valid(self):

"""

Returns True if the form has no errors. Otherwise, False. If errors are

being ignored, returns False.

"""

return self.is_bound and not bool(self.errors)


And empirically in my application, I don't see any cleaning taking place 
when I call is_valid.

Am I understanding something wrong? Is an application supposed to 
full_clean() directly followed by a call to is_valid()?

Thanks.

 

 

 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/rYlmQxyACuMJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to