Merge branch 'issue-1124' of https://github.com/kaedroho/wagtail into kaedroho-issue-1124

This commit is contained in:
Matt Westcott 2015-04-08 11:45:43 +01:00
commit c53ffbf929
2 changed files with 3 additions and 0 deletions

View file

@ -43,6 +43,7 @@ MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',

View file

@ -3,6 +3,7 @@ from django.shortcuts import render, redirect
from django.contrib import messages
from django.contrib.auth.forms import SetPasswordForm
from django.contrib.auth.views import logout as auth_logout, login as auth_login
from django.contrib.auth import update_session_auth_hash
from django.utils.translation import ugettext as _
from django.views.decorators.debug import sensitive_post_parameters
from django.views.decorators.cache import never_cache
@ -32,6 +33,7 @@ def change_password(request):
if form.is_valid():
form.save()
update_session_auth_hash(request, form.user)
messages.success(request, _("Your password has been changed successfully!"))
return redirect('wagtailadmin_account')