From e42bf56de7d28d2084e6a9fa169aeeff7dcdfda4 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 26 Jan 2014 17:36:28 +0100 Subject: [PATCH] fix password_reset_confirm url rule to be compatible with django 1.6 it now crashes for django 1.5, the code needed for 1.5 is commented in nsupdate/login/urls.py --- nsupdate/login/urls.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nsupdate/login/urls.py b/nsupdate/login/urls.py index 22b897c..b1d8844 100644 --- a/nsupdate/login/urls.py +++ b/nsupdate/login/urls.py @@ -13,7 +13,14 @@ urlpatterns = patterns( {'template_name': 'password_reset.html'}, name='password_reset'), url(r'^password_reset_done/$', 'django.contrib.auth.views.password_reset_done', {'template_name': 'password_reset_done.html'}, name='password_reset_done'), - url(r'^password_reset_confirm/(?P[0-9A-Za-z]{1,13})-(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', + # TODO: fix stuff below so it is compatible with django 1.5 AND 1.6: + # for django 1.5.x: + #url(r'^password_reset_confirm/(?P[0-9A-Za-z]{1,13})-(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', + # 'django.contrib.auth.views.password_reset_confirm', + # {'template_name': 'password_reset_confirm.html'}, name='password_reset_confirm'), + # + # for django 1.6.x: + url(r'^password_reset_confirm/(?P[0-9A-Za-z_\-]+)/(?P.+)/$', 'django.contrib.auth.views.password_reset_confirm', {'template_name': 'password_reset_confirm.html'}, name='password_reset_confirm'), url(r'^password_reset_complete/$', 'django.contrib.auth.views.password_reset_complete',