I'm using allauth for authentication and django messages work really well throughout all signup, login etc stages.
However, to avoid the 2 step 'are you sure you want to logout?' I have overidden the allauth view as so:
url(r'^accounts/logout/$', 'django.contrib.auth.views.logout',{'next_page': '/', }),
This technique works fine, and the user is redirected to the home page immediately after clicking 'logout.'
However, with this approach I'm no longer able to display a successfully logged out message.
Could anyone give me a tip on how to do this using the messages framework and my current setup?
Thanks in advance,
The simple answer to this is to simply set:
ACCOUNT_LOGOUT_ON_GET to True
The extra url to override accounts/logout isn't necessary..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With