I was trying to create a session through which I can determine the number of views of a post. So that only one visit was saved for each user and through this session I would know whether the user has already seen this post or not so that I don’t register a new view. But after the user logs out, the session is deleted and if the user login and sees the post again, a new view is registered. I know that it is possible to save the session after logout so that it is not deleted, but I can’t do it for this. Can I make the session not be deleted after logout or closing the site window or any other incident and its expiration period is 1 month?
1 Like
lja0207@ 로그아웃후세션유지
What does this mean? Can you please type in English?
Django performs a session flush upon logout, and what you want is a structural change to Django.
It is recommended to measure the number of views in a different way or to redirect to a fixed page when logging out.