8👍
✅
The default behavior is to only populate the session if you access or modify a key in the session
dict-like object.
To avoid this behavior set SESSION_SAVE_EVERY_REQUEST
to True
in your settings.py
file. This makes sure that a session is saved on each request, even if you didn’t modify the session object.
The authentication middleware has no bearing on sessions; by default django supports anonymous sessions.
Source:stackexchange.com