I am missing something really basic here.

I am trying to reuse django's change password views. I have following
in urls.py:

(r'^change-password/$', 'profile.views.change_password',
{},'change_password'),
url(r'^change-password-done/$', 'profile.views.password_change_done',
name='django.contrib.auth.views.password_change_done'),

and in corresponding views.py:

from django.contrib.auth.views import password_change,
password_change_done

def
change_password(request,template_name="password_change_form.html"):
    """Change Password"""
    return password_change(request,template_name=template_name)

def password_change_done(request,
template_name="password_change_done.html"):
    return render_to_response(template_name,(),context_instance=
RequestContext(request))

but I am getting following error:

    Reverse for 'django.contrib.auth.views.password_change_done' with
arguments '()' and keyword arguments '{}' not found.

looked at the source and saw this line:

post_change_redirect =
reverse('django.contrib.auth.views.password_change_done')

If I change my urls.py entry to following , I do not get the above
error:

url(r'^change-password-done/$',
'django.contrib.auth.views.password_change_done', name='anything'),

but I am confused as reverse() should look-up using the "name"
parameter? What am I missing here?

I am using django 1.2.3

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to