Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django 1.6 - templates for password change/reset

Tags:

python

django

I want to use django's password change/reset views so for example for the view

django.contrib.auth.views.password_change

I need create a template named

registration/password_change_form.html

the problem is that even though I have this template implemented in my project, django still shows the password-change page of the admin website, the only way I can make django use my template is by renaming it to something different - like registration/password_change_form_1.html and then pass the name

url(r'^password/change/$',
    auth_views.password_change,
    {'template_name': 'registration/password_change_form_1.html',
     'password_change_form': MyPasswordChangeForm},
    name='password_change'),

Am I missing something here? why won't django use my template when I use the default name?

like image 232
Dan Avatar asked Jan 10 '14 15:01

Dan


1 Answers

I think because your app is under django.contribute.admin in the INSTALLED_APP.

like image 188
Andrea de Marco Avatar answered Sep 19 '22 04:09

Andrea de Marco