views:

849

answers:

1

I'd like to override Django's administrative "Change Password" page (change_password.html). As such, I've placed Django's "/contrib/admin/templates/registration/password_change_form.html" in my project's "/templates/admin/registration/password_change_form.html" directory. Unfortunately, this doesn't seem to do the trick.

At this point, I'm stumped. I'm guessing it has something to do with Django's /contrib/auth/urls.py file (which directs the the admin change password call to "django.contrib.auth.views.password_change"), but admin template changes have been trivial so far and I'm surprised this one doesn't follow suit.

Any thoughts?

+3  A: 

This is not tested, but a quick look at the source indicates you should place the template in:

/templates/registration/password_change_form.html

Note bene: there is no 'admin/' in there.

Peter Rowell
Where did you see that as the solution? I must've overlooked it.
Huuuze
I read the source. Of course, on a second pass, I found it in the Djanog docs a http://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.django.contrib.auth.views.password_change
Peter Rowell
Look at the parameter list of the function `password_change` in django/contrib/auth/views.py
ayaz
Don't need to look at any of that, just look at the paths themselves. There's no "admin/" after "templates/" in the original location of the file, why would you add one and expect it to work?
Carl Meyer