From ad97bd5b140ba630e01ef2a24732742488657448 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Thu, 2 Apr 2015 13:24:30 +0100 Subject: [PATCH] Make password reset url configs use callables --- wagtail/wagtailadmin/urls.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wagtail/wagtailadmin/urls.py b/wagtail/wagtailadmin/urls.py index d6e5c01d15..805e237e21 100644 --- a/wagtail/wagtailadmin/urls.py +++ b/wagtail/wagtailadmin/urls.py @@ -1,5 +1,6 @@ from django.conf.urls import url from django.contrib.auth.decorators import permission_required +from django.contrib.auth import views as django_auth_views from django.views.decorators.cache import cache_control from wagtail.wagtailadmin.forms import PasswordResetForm @@ -92,7 +93,7 @@ urlpatterns += [ # Password reset url( - r'^password_reset/$', 'django.contrib.auth.views.password_reset', { + r'^password_reset/$', django_auth_views.password_reset, { 'template_name': 'wagtailadmin/account/password_reset/form.html', 'email_template_name': 'wagtailadmin/account/password_reset/email.txt', 'subject_template_name': 'wagtailadmin/account/password_reset/email_subject.txt', @@ -101,19 +102,19 @@ urlpatterns += [ }, name='wagtailadmin_password_reset' ), url( - r'^password_reset/done/$', 'django.contrib.auth.views.password_reset_done', { + r'^password_reset/done/$', django_auth_views.password_reset_done, { 'template_name': 'wagtailadmin/account/password_reset/done.html' }, name='wagtailadmin_password_reset_done' ), url( r'^password_reset/confirm/(?P[0-9A-Za-z_\-]+)/(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', - 'django.contrib.auth.views.password_reset_confirm', { + django_auth_views.password_reset_confirm, { 'template_name': 'wagtailadmin/account/password_reset/confirm.html', 'post_reset_redirect': 'wagtailadmin_password_reset_complete', }, name='wagtailadmin_password_reset_confirm', ), url( - r'^password_reset/complete/$', 'django.contrib.auth.views.password_reset_complete', { + r'^password_reset/complete/$', django_auth_views.password_reset_complete, { 'template_name': 'wagtailadmin/account/password_reset/complete.html' }, name='wagtailadmin_password_reset_complete' ),