From 2f2e0f510dc5d47485f8cdbccc1f854f0ef9572e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 4 Jan 2016 20:43:08 +0100 Subject: [PATCH] Authentication: include a change password menu entry --- umap/templates/umap/navigation.html | 3 +++ umap/urls.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/umap/templates/umap/navigation.html b/umap/templates/umap/navigation.html index 970d3c1b..3574e636 100644 --- a/umap/templates/umap/navigation.html +++ b/umap/templates/umap/navigation.html @@ -16,6 +16,9 @@
  • {% trans "About" %}
  • {% trans "Feedback" %}
  • {% if user.is_authenticated %} + {% if user.has_usable_password %} +
  • {% trans "Change password" %}
  • + {% endif %}
  • {% trans "Log out" %}
  • {% endif %} diff --git a/umap/urls.py b/umap/urls.py index 66a3702f..8915568e 100644 --- a/umap/urls.py +++ b/umap/urls.py @@ -5,6 +5,7 @@ from django.conf.urls import patterns, url, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from django.views.decorators.cache import cache_page +from django.contrib.auth import views as auth_views from leaflet_storage.views import MapShortUrl @@ -18,6 +19,8 @@ urlpatterns = patterns( url('', include('social.apps.django_app.urls', namespace='social')), url(r'^m/(?P\d+)/$', MapShortUrl.as_view(), name='umap_short_url'), url(r'^ajax-proxy/$', cache_page(180)(views.ajax_proxy), name='ajax-proxy'), # noqa + url(r'^change-password/', auth_views.password_change, name='password_change'), + url(r'^change-password-done/', auth_views.password_change_done, name='password_change_done'), ) urlpatterns += i18n_patterns( '',