comoga/django-constance — pull request #36 by Bouke (2013-05-23 09:39:01+00:00)
Title: Hash settings to prevent overwriting of someone else's changes

In a project where we are using django-constance, we have had serious problems with multiple users changing values.

Problem:
* User A and B open the form
* User B makes changes and submits
* User A makes other changes and submits
* Only changes from User A are stored

Proposed Solution:
* Values are hashed and included in a hidden form field
* When validating the form, submitted hash is compared with actual hash; if the hashes are the same, the change is allowed, otherwise the changes are rejected (and user is notified to reload the form).

I don't know if the problem and solution are of added value to django-constance in general. For our use case, it is a must-have. There is no harm for us having to deploy a custom version. If you like the proposed solution, we can provide the necessary unit tests.