aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-09-20 20:11:13 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2016-09-20 20:11:13 +1200
commitae550c5a6c4b7ed531dd89edc06e3dd4f5a9cbf5 (patch)
treea51332c161deca8fe4c970510de96f5cfbd85afd
parent00bae9978dda09f859a26756263b8f38ea94edd4 (diff)
downloadopenembedded-core-contrib-ae550c5a6c4b7ed531dd89edc06e3dd4f5a9cbf5.tar.gz
Fix for changes to auth views in Django 1.6
Part of this change is temporary for django-registration 1.0; later versions probably won't require the workaround URLs. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--templates/registration/password_reset_email.html2
-rw-r--r--urls.py22
2 files changed, 23 insertions, 1 deletions
diff --git a/templates/registration/password_reset_email.html b/templates/registration/password_reset_email.html
index f219c683e1..6b7358cfcf 100644
--- a/templates/registration/password_reset_email.html
+++ b/templates/registration/password_reset_email.html
@@ -1,5 +1,5 @@
{% load i18n %}
{% blocktrans %}Reset password at {{ site_name }}{% endblocktrans %}:
{% block reset_link %}
-{{ protocol }}://{{ domain }}{% url "auth_password_reset_confirm" uidb36=uid, token=token %}
+{{ protocol }}://{{ domain }}{% url "auth_password_reset_confirm" uidb64=uid token=token %}
{% endblock %}
diff --git a/urls.py b/urls.py
index 649635c96f..8b5c9f6875 100644
--- a/urls.py
+++ b/urls.py
@@ -7,6 +7,7 @@
from django.conf.urls import patterns, include, url
from django.views.generic import RedirectView
+from django.contrib.auth import views as auth_views
from django.contrib import admin
admin.autodiscover()
@@ -14,6 +15,27 @@ admin.autodiscover()
urlpatterns = patterns('',
url(r'^layerindex/', include('layerindex.urls')),
url(r'^admin/', include(admin.site.urls)),
+
+ # override the default auth urls since django-registration 1.0 isn't Django 1.6 compatible
+ url(r'^password/change/$',
+ auth_views.password_change,
+ name='password_change'),
+ url(r'^password/change/done/$',
+ auth_views.password_change_done,
+ name='password_change_done'),
+ url(r'^password/reset/$',
+ auth_views.password_reset,
+ name='password_reset'),
+ url(r'^password/reset/done/$',
+ auth_views.password_reset_done,
+ name='password_reset_done'),
+ url(r'^password/reset/complete/$',
+ auth_views.password_reset_complete,
+ name='password_reset_complete'),
+ url(r'^password/reset/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
+ auth_views.password_reset_confirm,
+ name='auth_password_reset_confirm'),
+
url(r'^accounts/', include('registration.backends.default.urls')),
url(r'^captcha/', include('captcha.urls')),
url(r'.*', RedirectView.as_view(url='/layerindex/', permanent=False)),