Stop django after logging out

I am working on a django project, and after a few days, django continues to record me after changing the source file.

The expiration date in the cookies and in the database shows that there is still 1 month left.

Even after making the changes, the session cookie matches the database, but I need to log in again. and after registration in both sessions (changing the database and browser).

I am using django 1.8.5

edit: some session-related settings:

SESSION_EXPIRE_AT_BROWSER_CLOSE        False
SESSION_COOKIE_HTTPONLY                True
SESSION_COOKIE_DOMAIN                  None
SESSION_SAVE_EVERY_REQUEST             False
SESSION_COOKIE_SECURE                  False

edit2:

Just to be a little clearer: after changing some source file (python files, templates work fine), the server will reboot (if I use --noreload, I have to do this manually to get the changes), after which everyone is logged out.

Edit3:

CACHES              {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
SESSION_ENGINE      'django.contrib.sessions.backends.db'
+4
1

Django SESSION_ENGINE, , . : django.contrib.sessions.backends.cache, -.

- - django.core.cache.backends.locmem.LocMemCache -, ( . CACHES). , , , .

, , . , !

+1

Source: https://habr.com/ru/post/1613645/


All Articles