I have a page in Django that allows only one user to view at the same time. Is there a way to get this information? If I can know that someone is going to a page, then I can stop other requests.
Thank you.
Use your database as "referee". Create a class that is a generic. The template view is derived from
, and override the code and / or post
, and create a query before calling parents to the database : If the pages are being viewed, do not call parents and return a redirect to the main page.
But if you are watching a computer, it stops in the computer: How do you know that he is not looking anymore? You may have to implement watchdog or some thing, and even then, with Chrome, the watchdog will be stopped if it is not an active tab ... If I were you, then I would find another way to deal with the problem.
No comments:
Post a Comment