Is there any way to know a specific page is being visited in Django? -


i have page in django allows 1 user see @ same time. there way information? if can know visiting page, can block other requests then.

thank you.

use database "referee". make class inherits generic.templateview, override get and/or post method, , before calling parent, make query database: if page being watched dont call parent , return redirect main page.

but may run trouble if 1 viewing page switches off computer: how know he's not watching anymore? may have implement watchdog or something, , then, chrome, watchdog stopped if it's not active tab... if search way of dealing problem.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -