fnp
/
cas.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor migration fix.
[cas.git]
/
src
/
accounts
/
views.py
diff --git
a/src/accounts/views.py
b/src/accounts/views.py
index
5f153c0
..
9a95608
100644
(file)
--- a/
src/accounts/views.py
+++ b/
src/accounts/views.py
@@
-1,6
+1,7
@@
# Create your views here.
from django import http
from django.contrib.auth.decorators import login_required
# Create your views here.
from django import http
from django.contrib.auth.decorators import login_required
+from django.contrib.auth import update_session_auth_hash
from django.contrib import messages
from django.shortcuts import render
from django.utils.translation import ugettext as _
from django.contrib import messages
from django.shortcuts import render
from django.utils.translation import ugettext as _
@@
-37,6
+38,7
@@
def account_change_password(request):
if form.is_valid():
request.user.set_password(form.cleaned_data['new_password'])
request.user.save()
if form.is_valid():
request.user.set_password(form.cleaned_data['new_password'])
request.user.save()
+ update_session_auth_hash(request, request.user)
messages.add_message(request, messages.INFO, _("Password has been changed."))
return http.HttpResponseRedirect('/accounts/')
messages.add_message(request, messages.INFO, _("Password has been changed."))
return http.HttpResponseRedirect('/accounts/')