You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the upgrade to Django 1.6.2 I found another issue:
ERROR 2014-03-11 10:32:05,235 | [...]/python2.7/site-packages/django/core/handlers/base.py:226 (in handle_uncaught_exception) | Internal Server Error: /accounts/password/reset/
Traceback (most recent call last):
File "[...]/python2.7/site-packages/django/core/handlers/base.py", line 114, in get_response
response = wrapped_callback(request, _callback_args, *_callback_kwargs)
File "[...]/python2.7/site-packages/django/utils/decorators.py", line 99, in _wrapped_view
response = view_func(request, _args, *_kwargs)
File "[...]/python2.7/site-packages/django/contrib/auth/views.py", line 158, in password_reset
form.save(**opts)
File "[...]/python2.7/site-packages/django/contrib/auth/forms.py", line 236, in save
if not user.has_usable_password():
AttributeError: 'RegistrationProfile' object has no attribute 'has_usable_password'
The solution was quite simple. In class RegistrationProfile(User) inside registration/documents.py, add
Hmm, that's debatable. The code has no problem with Django 1.5. It works out of the box, except the reset view, but that comes from the Django core, [1], which expects User.id to be an integer in django.contrib.auth's pasword reset feature. This is the reason for my upgrade, indeed, the bug was solved in Django 1.6.
Hi
With the upgrade to Django 1.6.2 I found another issue:
ERROR 2014-03-11 10:32:05,235 | [...]/python2.7/site-packages/django/core/handlers/base.py:226 (in handle_uncaught_exception) | Internal Server Error: /accounts/password/reset/
Traceback (most recent call last):
File "[...]/python2.7/site-packages/django/core/handlers/base.py", line 114, in get_response
response = wrapped_callback(request, _callback_args, *_callback_kwargs)
File "[...]/python2.7/site-packages/django/utils/decorators.py", line 99, in _wrapped_view
response = view_func(request, _args, *_kwargs)
File "[...]/python2.7/site-packages/django/contrib/auth/views.py", line 158, in password_reset
form.save(**opts)
File "[...]/python2.7/site-packages/django/contrib/auth/forms.py", line 236, in save
if not user.has_usable_password():
AttributeError: 'RegistrationProfile' object has no attribute 'has_usable_password'
The solution was quite simple. In class RegistrationProfile(User) inside registration/documents.py, add
def has_usable_password(self):
return hashers.is_password_usable(self.password)
requires a from django.contrib.auth import hashers on top.
Thank you for this great app.
The text was updated successfully, but these errors were encountered: