1π
β
It turns out itβs the same issue as Django automatic login after user registration (1.4)
Following was my import statement:
from django.contrib.auth import forms as auth_forms, views as auth_views, login, authenticate
Changed it to
from django.contrib.auth import forms as auth_forms, views as auth_views
from django.contrib.auth import login as auth_login, authenticate as auth_authenticate
and updated all the login
and authenticate
call to auth_login
and auth_authenticate
and seems to work now.
Thank you all for your help !
π€Andrew Hong
0π
Itβs just a guess, but maybe super().form_valid() is saving the UserCreationForm a second time, which will call set_password() again, therefore setting a new salted password, invalidating your first login π
https://docs.djangoproject.com/en/1.7/_modules/django/contrib/auth/forms/#UserCreationForm
π€ACimander
Source:stackexchange.com