Question

I have a website, which will be frequently updated. Sometimes changes happen to User specific models and are linked to sessions.

After I update my site, I want the user to log out and log back in. So I would log out the user right then. If he logs back in, he will see the latest updates to the site.

How do I do it?

Was it helpful?

Solution

You could just reset your session table. This would logout every user. Of course, depending on what your doing with sessions, it could have other implications (like emptying a shopping cart, for example).

python manage.py reset sessions

Or in raw SQL:

DELETE FROM django_sessions
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top