[Solved]-Django form.cleaned_data is None

17👍

form.clean() must return cleaned_data. The canonical implementation is:

class MyForm(forms.Form):
    # ...
    def clean(self):
        cleaned_data = super(MyForm, self).clean()
        # do your custom validations / transformations here
        # and some more
        return cleaned_data

Leave a comment