Is admin-locking to prevent concurrent edits built in yet?

Back in DJ1.6 or so I needed a way to prevent users from simultaneously editing the same DB record in the admin interface.

I forked a git repo called “admin-locking” that worked great! As I updated to newer DJ releases, I switched to “django-admin-locking” fork:

I updated its syntax for Dj2.2.

My host provider “Python Anywhere” is retiring the OS image I am on, so I have to move to a new image, with newer DJ and Python versions installed.

I just dug around the DJ4.2 docs and DJ3.x release notes to see if concurrent record edit protection was added.

The only thing I saw was the new “select_for_update()”, but like the older ATOMIC db edit mode, it prevents users from reading the data while its locked. This is not helpful, there are many things in the record other users will need to access. I just want them to know what they see if read-only, and that means somebody is editing and may save changes.

The Django-Admin-Locking add on does this very well. Using javascript attached to the admin forms it makes everything read only if it sees an active LOCK record for the item your looking at. It displays a message, and provides a take-over button if needed.

If this is still the best way, I will update the syntax to a newer DJ and Python version.