Notifying user's browser of change without websockets
You need a table with current editor, record_id and timeout. The first editor asks per POST-request to edit a record and you put a new line in this table, with a reasonable timeout, say 5 min. The first editor gets an "ok" in return. For the second editor you find a match for the record_id in the table, look at the timeout, and if it's not timed out, (s)he gets an "error" in return to the post request. In an second POST-request, an editor send it's changes. You look in the table, if (s)he's the editor and send "changed" or "rejected" accordingly.
I'm developing intranet web app that is based on Pyramid with SQLAlchemy.
It eventually may (will) happen that 2 users will edit the same record. How can I handle the requirement to notify the user who started editing later that particular record is being edited by the first user?