8
You have the right setting for logging out part but your system is not informing the active requests to the session table, therefore system explicitly needs to save your new requests to session table which will updates timeout to expire.
In your Settings.py
SESSION_EXPIRE_AT_BROWSER_CLOSE = True # opional, as this will log you out when browser is closed
SESSION_COOKIE_AGE = 300 # 0r 5 * 60, same thing
SESSION_SAVE_EVERY_REQUEST = True # Will prrevent from logging you out after 300 seconds
Source:stackexchange.com