DEPRECATED in favour of https://github.com/lig/regme. A user-registration application for Django (MongoEngine rework).
BSD 3-Clause "New" or "Revised" License
21
stars
7
forks
source link
Cannot import UNUSABLE_PASSWORD with Django 1.6.2 #6
Open
ghost opened 10 years ago
Hi, after upgrading to Django 1.6.2, registration-me produced an error:
ImportError at /accounts/login
cannot import UNUSABLE_PASSWORD
A solution was to change registration/forms.py and replace
from django.contrib.auth.hashers import UNUSABLE_PASSWORD
with from django.contrib.auth.hashers import UNUSABLE_PASSWORD_PREFIX
And change in PasswordResetForm:
if self.users_cache.filter(password=UNUSABLE_PASSWORD).count():
to
if self.users_cache.filter(password__startswith=UNUSABLE_PASSWORD_PREFIX).count():
I wonder if this is a good solution?