# HG changeset patch # User Brian Neal # Date 1468981244 18000 # Node ID 85119508e0721dcb58fe00b74c92f73201b94b05 # Parent d613d25a021e65664b8527947fc8e1c85681ce21 Convert password change to V3 design. diff -r d613d25a021e -r 85119508e072 accounts/urls.py --- a/accounts/urls.py Tue Jul 12 21:31:09 2016 -0500 +++ b/accounts/urls.py Tue Jul 19 21:20:44 2016 -0500 @@ -2,7 +2,6 @@ from django.conf.urls import url from django.conf import settings import django.contrib.auth.views as auth_views -from django.views.generic import TemplateView import accounts.views @@ -34,8 +33,11 @@ name='accounts-logout'), url(r'^password/$', auth_views.password_change, - {'template_name': 'accounts/password_change.html', - 'post_change_redirect': settings.LOGIN_REDIRECT_URL}, + kwargs={ + 'template_name': 'accounts/password_change.html', + 'post_change_redirect': settings.LOGIN_REDIRECT_URL, + 'extra_context': {'V3_DESIGN': True}, + }, name='accounts-password_change'), url(r'^password/reset/$', auth_views.password_reset, diff -r d613d25a021e -r 85119508e072 sg101/templates/accounts/password_change.html --- a/sg101/templates/accounts/password_change.html Tue Jul 12 21:31:09 2016 -0500 +++ b/sg101/templates/accounts/password_change.html Tue Jul 19 21:20:44 2016 -0500 @@ -1,13 +1,34 @@ -{% extends 'base.html' %} +{% extends 'v3/base.html' %} {% block title %}Change Password{% endblock %} {% block content %}

Change Password

{% csrf_token %} - -{{ form.as_table }} - -
  -  Cancel -
+ {{ form.non_field_errors }} + {{ form.old_password.errors }} +
+
+ +
+
+ {{ form.new_password1.errors }} +
+
+ +
+
+ {{ form.new_password2.errors }} +
+
+ +
+
+ + Cancel
{% endblock %}