if request.method == \'POST\':
userf = UsersModelForm(request.POST)
username = userf.data[\'username\']
password = userf.data[\'password\']
passwordrepea
Override _clean
methods and put your checks in them. You can modify cleaned_data
from there.
E.g:
def clean_password(self):
new1 = self.cleaned_data['password']
return new1
Every fields in the form will have a field_name_clean()
method created automatically by Django. This method is called when you do form.is_valid()
.