Reputation: 35982
I have used the following code snippet to logout the user from the session.
from django.http import HttpResponseRedirect
from django.contrib.auth import logout
def logout_page(request):
logout(request)
return HttpResponseRedirect('/')
Question> I need to notify the user that he/she has successfully logout. How can I do that in django?
Thank you
Upvotes: 0
Views: 100
Reputation: 28637
i guess you could redirect them to a thanks for logging out
page instead of /
you may also want to have a look at the messages framework
Upvotes: 4