password_reset_form_save() got an unexpected keyword argument 'request'

199 views
Skip to first unread message

Ben O'Day

unread,
Sep 26, 2011, 7:31:04 PM9/26/11
to Django users
I recently upgraded to Django 1.3 (from 1.2) and noticed that our
password reset functionality isn't working. I do have the templates
customized, but am using the default view/form files for this.
Looking at the django.contrib.auth.views file, I can't see the issue
either (the parameters in the opt dict seem to match the expected
params on the form, etc)

here is my urls.py config...

# password reset
(r'^password_reset/$', 'django.contrib.auth.views.password_reset',
{'template_name':'registration/dasn_password_reset.html',
'email_template_name':'email/dasn_password_reset_email.html'}),
(r'^password_reset/done/$',
'django.contrib.auth.views.password_reset_done',
{'template_name':'registration/dasn_password_reset_done.html'}),
(r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
'django.contrib.auth.views.password_reset_confirm', {'template_name':
'registration/dasn_password_reset_confirm.html'}),
(r'^reset/done/$',
'django.contrib.auth.views.password_reset_complete', {'template_name':
'registration/dasn_password_reset_complete.html'}),

here is the error...any ideas?

Request Method: POST
Request URL: http://127.0.0.1:8000/password_reset/
Django Version: 1.3 SVN-16907
Exception Type: TypeError
Exception Value:

password_reset_form_save() got an unexpected keyword argument
'request'

Exception Location: c:\projects\dasn\django\django\contrib\auth
\views.py in password_reset, line 155
Python Executable: C:\Python27\python.exe
Python Version: 2.7.1
Python Path:

['C:\\projects\\dasn\\dasn\\apps',
'C:\\Python27\\lib\\site-packages\\xlrd-0.7.1-py2.7-win32.egg',
'C:\\Python27\\lib\\site-packages\\pil-1.1.7-py2.7-win32.egg',
'C:\\Python27\\lib\\site-packages\\markdown-2.0.3-py2.7-win32.egg',
'C:\\Python27\\lib\\site-packages\\boto-2.0b3-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\robhudson-django-debug-
toolbar-930f33b',
'c:\\projects\\dasn\\django',
'c:\\projects\\dasn\\dasn',
'c:\\projects\\dasn\\dasn\\apps',
'C:\\Windows\\system32\\python27.zip',
'C:\\Python27\\DLLs',
'C:\\Python27\\lib',
'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk',
'C:\\Python27',
'C:\\Python27\\lib\\site-packages',
'C:\\Python27\\lib\\site-packages\\PIL']

Karen Tracey

unread,
Sep 28, 2011, 7:28:22 AM9/28/11
to django...@googlegroups.com
On Mon, Sep 26, 2011 at 7:31 PM, Ben O'Day <bpo...@gmail.com> wrote:
I recently upgraded to Django 1.3 (from 1.2) and noticed that our
password reset functionality isn't working.  I do have the templates
customized, but am using the default view/form files for this.
Looking at the django.contrib.auth.views file, I can't see the issue
either (the parameters in the opt dict seem to match the expected
params on the form, etc)

here is my urls.py config...
[snip]


here is the error...any ideas?

Request Method:         POST
Request URL:    http://127.0.0.1:8000/password_reset/
Django Version:         1.3 SVN-16907

So based on this info you are using the latest (or thereabouts) 1.3.X branch, not 1.3 release, right?
 
Exception Type:         TypeError
Exception Value:

password_reset_form_save() got an unexpected keyword argument
'request'

password_reset_form_save() doesn't exist in stock Django code, so this looks a bit odd.

Exception Location:     c:\projects\dasn\django\django\contrib\auth
\views.py in password_reset, line 155

This line is: https://code.djangoproject.com/browser/django/branches/releases/1.3.X/django/contrib/auth/views.py#L155

form.save(**opts)

The message you would get there if opts had an unexpected keyword argument is:


save() got an unexpected keyword argument 'request'

It looks to me like you have something custom in the Django code -- where is that password_reset_form_save function coming from? (It also doesn't appear that passing request to the password reset form is new in 1.3.)

Karen
--
http://tracey.org/kmt/

Reply all
Reply to author
Forward
0 new messages