Answer the question
In order to leave comments, you need to log in
Django - How to display a list of users who read a given news item?
There is news of the site, as on the page of a separate news, display a list of users who are reading it now. those. in the last 10 minutes?
There is an idea, roughly speaking, to create a class N, where there will be 3 fields:
- User
- View date
- News ID
And on the news page, simply display a list of users with the news ID filter and view date for the last 10 minutes.
But it looks clumsy, how can it be implemented more elegantly?
Answer the question
In order to leave comments, you need to log in
As an option, use a radish-type cache, setting the desired record lifetime
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question