add a patch to fix django-registration to be compatible with django 1.6

This commit is contained in:
Thomas Waldmann 2013-12-22 03:13:40 +01:00
parent bbe7ae096a
commit fb4723cdd0

View File

@ -0,0 +1,39 @@
Django 1.6.x compatibility fix for django-registration (which is, as of 1.0,
not compatible with Django 1.6.x).
taken from https://bitbucket.org/kubaz93/django-registration/branch/django1.6
(merged cs 2251209 and 6e1776d)
diff --git a/registration/auth_urls.py b/registration/auth_urls.py
--- a/registration/auth_urls.py
+++ b/registration/auth_urls.py
@@ -26,6 +26,7 @@
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
+from django.core.urlresolvers import reverse_lazy
from django.contrib.auth import views as auth_views
@@ -41,15 +42,18 @@
name='auth_logout'),
url(r'^password/change/$',
auth_views.password_change,
+ {'post_change_redirect': reverse_lazy('auth_password_change_done')},
name='auth_password_change'),
url(r'^password/change/done/$',
auth_views.password_change_done,
name='auth_password_change_done'),
url(r'^password/reset/$',
auth_views.password_reset,
+ {'post_reset_redirect': reverse_lazy('auth_password_reset_done')},
name='auth_password_reset'),
- url(r'^password/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
+ url(r'^password/reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
auth_views.password_reset_confirm,
+ {'post_reset_redirect': reverse_lazy('auth_password_reset_complete')},
name='auth_password_reset_confirm'),
url(r'^password/reset/complete/$',
auth_views.password_reset_complete,