ModelForms are a nice way to prevent repeating the definitions of models one creates. What I would like to do is take advantage of that feature and use it for more than just processing POST requests. I use forms a lot for validation.
Example:
Say you have a User model with the fields (email, password, first_name, last_name). The email field is unique and an index.
UserCreationForm: uses all fields, fails validation if the email already exists. Processes POST requests UserUpdateForm: the same model, but doesn't allow to change the email. Because this field is excluded no issues there. UserAuthenticationForm: includes only the email and password fields. The problem is, this should be used for authentication and validation fails because the email already exists.
Is there a way I can do this? That is, have the UserAuthenticationForm skip the email checking.
Thank you.