I\'ve been stuck on this for a while now and can\'t seem to figure out what\'s going on. I\'m just starting to learn Django and I got my login set up and now want to impleme
My guess is that your meta class fields
doesn't include username
.
You are inheriting the form field from UserCreationForm
but it's not saving to the User
model and therefore authenticate
is failing, and crashing on login()
The docs suggest you check whether authenticate()
is successful before using login()