Answer the question
In order to leave comments, you need to log in
How to resolve conflicts in Django?
I am using Python2.7, Django 1.8, Mysql 5.5.
It is necessary to make sure that when editing database fields through the admin panel by several people, a lock is placed on editing the field if someone is already editing it.
Found Django Concurrency, but it looks like a hack that adds an extra field to every table. I would like the database itself to resolve such conflicts. I think something like is needed , but where can I put it in the jang admin panel? select for update
Answer the question
In order to leave comments, you need to log in
I would like the database itself to resolve such conflicts.The DBMS is not connected with a similar task. This is the application layer.
If you don't like django-concurrency write your app with `select ... for update` and whores.
In my opinion, a separate field for each table is a normal solution, especially since selectfoupdate locks the entire table, but you need, for example, to lock only one or a few records, but for a long time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question