Django: How can I protect against concurrent modification of data base entries

Posted by Ber on Stack Overflow See other posts from Stack Overflow or by Ber
Published on 2008-11-26T09:00:35Z Indexed on 2010/06/02 15:33 UTC
Read the original article Hit count: 234

If there a way to protect against concurrent modifications of the same data base entry by two or more users?

It would be acceptable to show an error message to the user performing the second commit/save operation, but data should not be silently overwritten.

I think locking the entry is not an option, as a user might use the "Back" button or simply close his browser, leaving the lock for ever.

© Stack Overflow or respective owner

Related posts about django

Related posts about django-models