Alex Rivera | Logout

Django-nonrel + Django-registration problem: unexpected keyword argument 'uidb36' when resetting password

Asked 2011-06-12T18:42:11.273
21

I'm using Django-nonrel with registration app. Things seem to be working fine, except when I try to reset my password. When clicking on reset-password link sent to me in email, Django produces error message:

password_reset_confirm() got an unexpected keyword argument 'uidb36'

My question: has anybody seen it and knows what's the cure?

EDIT:

The problem is caused by registration\auth_urls.py - they duplicate entries in django\contrib\auth\urls.py, circumwenting patched version of the file in Django-nonrel.

Any ideas why is it there and can I actually remove it or fix it otherwise?

Edit
Report

1 Answer

9

My solution was to comment out urlpatterns defined in registration\auth_urls.py, and redefine them as a copy of urlpatterns defined in django.contrib.auth.

Here's my auth_urls.py after the change:

"""
URL patterns for the views included in ``django.contrib.auth``.

Including these URLs (via the ``include()`` directive) will set up the
following patterns based at whatever URL prefix they are included
under:

* User login at ``login/``.

* User logout at ``logout/``.

* The two-step password change at ``password/change/`` and
  ``password/change/done/``.

* The four-step password reset at ``password/reset/``,
  ``password/reset/confirm/``, ``password/reset/complete/`` and
  ``password/reset/done/``.

The default registration backend already has an ``include()`` for
these URLs, so under the default setup it is not necessary to manually
include these views. Other backends may or may not include them;
consult a specific backend's documentation for details.

"""

from django.conf.urls.defaults import *

#from django.contrib.auth import views as auth_views

from django.contrib.auth import urls as auth_urls

urlpatterns = auth_urls.urlpatterns

'''
Commented out, this is what caused my problems:

urlpatterns = patterns('',
                       url(r'^login/$',
                           auth_views.login,
                           {'template_name': 'registration/login.html'},
                           name='auth_login'),
                       url(r'^logout/$',
                           auth_views.logout,
                           {'template_name': 'registration/logout.html'},
                           name='auth_logout'),
                       url(r'^password/change/$',
                           auth_views.password_change,
                           name='auth_password_change'),
                       url(r'^password/change/done/$',
                           auth_views.password_change_done,
       
answered 2011-06-13T00:22:45.387

Your Answer