I have two simple views, one is log in and the other one is just checking the session. I added user_id
into the request.session
and it did create a new entry in the django_session table. But when I try to get the request session in a new request. It returns an empty one.
Django already has an authentication system, and it uses sessions by default, this tutorial will guide you through it
If you want to use your own authentication backend docs