5👍
✅
You can use user_logged_out
signal
from django.contrib.auth.signals import user_logged_out
from django.contrib import messages
def show_message(sender, user, request, **kwargs):
# whatever...
messages.info(request, 'You have been logged out.')
user_logged_out.connect(show_message)
Source:stackexchange.com