Not 100% sure how to phrase the question but here is the problem:
I have a website serving documents which each have their own URL, for example: www.app/doc/1 www.app/doc/2
The website allows users to edit the documents and save the changes. I want to put a lock in place so that only one user can edit a document at a time. So, if one client has www.app/doc/1 open then noone else should be able to open the same URL.
The web app is developed in Django. Any pointers on how to do this? I know some websites are able to pick up if you have a page open in another tab and force you to pick an active tab. What is the method that they use?