According to the Django documentation here on session functionality:
request.session.flush()
Deletes the current session data from the session and deletes the session cookie. (django.contrib.auth.logout() function calls it)
But does it also automatically expire the session entry inside the database table?
Because if it doesn't, I think that might cause an unnecessary build up of non-usable but non-expired sessions inside the table.