MCPcopy
hub / github.com/django/django / full_clean

Method full_clean

django/forms/forms.py:324–339  ·  view source on GitHub ↗

Clean all of self.data and populate self._errors and self.cleaned_data.

(self)

Source from the content-addressed store, hash-verified

322 )
323
324 def full_clean(self):
325 """
326 Clean all of self.data and populate self._errors and self.cleaned_data.
327 """
328 self._errors = ErrorDict(renderer=self.renderer)
329 if not self.is_bound: # Stop further processing.
330 return
331 self.cleaned_data = {}
332 # If the form is permitted to be empty, and none of the form data has
333 # changed from the initial data, short circuit any validation.
334 if self.empty_permitted and not self.has_changed():
335 return
336
337 self._clean_fields()
338 self._clean_form()
339 self._post_clean()
340
341 def _clean_fields(self):
342 for name, bf in self._bound_items():

Callers 15

errorsMethod · 0.95
_post_cleanMethod · 0.45
_get_cleaned_formMethod · 0.45
_get_cleaned_formsetMethod · 0.45
invalidMethod · 0.45
test_multiple_formsMethod · 0.45

Calls 5

has_changedMethod · 0.95
_clean_fieldsMethod · 0.95
_clean_formMethod · 0.95
_post_cleanMethod · 0.95
ErrorDictClass · 0.90