1👍
✅
Django sessions are not tied to the admin. They are enabled by default. They are are provided by a middleware.
The django.contrib.sessions.middleware.SessionMiddleware
middleware will populate request.session
and request.user
on any requests made to your app.
If the user is logged in request.user
will be the corresponding User
object, otherwise it will be an AnonymousUser
instance.
You can find more information in the django documentation. This page includes the different configuration options, but you should be able to make do with the defaults.
Source:stackexchange.com