Add logout success message

This commit is contained in:
Liam Brenner 2016-05-09 16:59:34 +10:00 committed by Mikalai Radchuk
parent 05be39e85f
commit ca846a5941
3 changed files with 3 additions and 0 deletions

View file

@ -30,6 +30,7 @@ Changelog
* Added auto resizing text field, richtext field, and snippet chooser to styleguide (Liam Brenner)
* Support field widget media inside `StreamBlock` blocks (Karl Hobley)
* Spinner was added to Save button on site settings (Liam Brenner)
* Added success message after logout from Admin (Liam Brenner)
* Fix: The currently selected day is now highlighted only in the correct month in date pickers (Jonas Lergell)
* Fix: Fixed crash when an image without a source file was resized with the "dynamic serve view"
* Fix: Registered settings admin menu items now show active correctly (Matthew Downey)

View file

@ -55,6 +55,7 @@ Minor features
* Added auto resizing text field, richtext field, and snippet chooser to styleguide (Liam Brenner)
* Support field widget media inside ``StreamBlock`` blocks (Karl Hobley)
* Spinner was added to Save button on site settings (Liam Brenner)
* Added success message after logout from Admin (Liam Brenner)
Bug fixes
~~~~~~~~~

View file

@ -126,6 +126,7 @@ def login(request):
def logout(request):
response = auth_views.logout(request, next_page='wagtailadmin_login')
messages.success(request, _('You have been successfully logged out.'))
# By default, logging out will generate a fresh sessionid cookie. We want to use the
# absence of sessionid as an indication that front-end pages are being viewed by a
# non-logged-in user and are therefore cacheable, so we forcibly delete the cookie here.