I want to find a simple way to notify users about a new release note without using django-notifications or adding a relation between user and release notes table in the database, using something like a flag that returns true once a new release note is added but i don't know if its possible to use session to check if user has already seen the release note or not.
Asked
Active
Viewed 99 times
1 Answers
0
Sessions are probably not a good solution for your problem:
- Depending on your session backend, accessing sessions outside of a request is hard (DB backend) or downright impossible (cookie backend).
- When a user logs out, the session is lost.
- A user can have multiple sessions.
If you are fine with users seeing release notes multiple times, storing the date/id of the last release note seen in the session could work.
The most reliable approach is a ReleaseNoteHistory
table where you store either the date of or a reference to the last release note the user has seen.

Daniel Hepper
- 28,981
- 10
- 72
- 75
-
I think storing the date/id of the last release note seen in the session would be good because users are able to see release notes multiple times, but from (2.) if i logout and i login again with the same user i will have new session and the same notification in this case ... somehow users needs to be linked to this last release note? – Aymen Sallem Apr 29 '19 at 13:28