Dushyant Deshwal
Dushyant Deshwal

Reputation: 419

How to expire a session in django?

There are some things i do not understand and i am not using in django, Like Serialize. From another question :How to expire Session in 5 mins? The sessions is confusing me.The sessions are active added in my installed apps and middle ware but.. I am using a simple login from the URL like this : path('login/', auth_views.LoginView.as_view(template_name='login.html'), name='login'),

It generates a login form and work. How can i keep using this and now set Session expire time dynamically bases on user request to

Remember Me

Or what should i change and start over again to implement this whole idea ?

Upvotes: 1

Views: 346

Answers (1)

Akshat Zala
Akshat Zala

Reputation: 703

Please study the below link:

  1. https://docs.djangoproject.com/en/3.0/topics/http/sessions/

    and use:

    set_expiry(value)

Upvotes: 1

Related Questions