1👍
✅
Don’t rely on the session cookie for this (because indeed, Django automatically rotates it across login / logouts — mainly to prevent session fixation attacks).
Instead, just create your own cookie, and track users that way.
Source:stackexchange.com