I have a django form and on my view function I do this :
search_packages_form = SearchPackagesForm( data = request.POST )
I would like to overw
form.is_valid()
runs through your form's (and model's in case of a ModelForm
) clean
method's, returning True
or False
If you plan on changing form data you can do it within the general clean method or at field level, e.g.
class YourForm(DerivingClass):
# regular stuff
def clean_(self):
# here
return self.cleaned_data
def clean(self):
# or here
return super(YourForm, self).clean()