What you usually do in django to get the form data will be something like this.
form = testForm(request.POST)
if form.is_valid:
...
else:
...
If you want to do some formatting or data validation yourself, you can put this in the validation method on the form. Either for the entire form, or for the form field. This is also a great way to make your code drier.
source
share