Django session timeout handler
I have a function my_logout_handler() that needs to be called when a user logs out. I am calling the function in the logout function as below.
def logout(request, login_url=None, **kwargs):
// original code here
my_logout_handler()
It works perfect except that it is not called when user is logged out due to session timeout. Where should I put my code for it to get called on session timeout?