diff --git a/constance/admin.py b/constance/admin.py index ca9c9c4..3b8f9fe 100644 --- a/constance/admin.py +++ b/constance/admin.py @@ -103,6 +103,10 @@ class ConstanceForm(forms.Form): def clean_version(self): value = self.cleaned_data['version'] + + if settings.IGNORE_ADMIN_VERSION_CHECK: + return value + if value != self.initial['version']: raise forms.ValidationError(_('The settings have been modified ' 'by someone else. Please reload the ' diff --git a/constance/settings.py b/constance/settings.py index fd5edd4..85cc373 100644 --- a/constance/settings.py +++ b/constance/settings.py @@ -24,3 +24,7 @@ REDIS_CONNECTION_CLASS = getattr(settings, 'CONSTANCE_REDIS_CONNECTION_CLASS', REDIS_CONNECTION = getattr(settings, 'CONSTANCE_REDIS_CONNECTION', {}) SUPERUSER_ONLY = getattr(settings, 'CONSTANCE_SUPERUSER_ONLY', True) + +IGNORE_ADMIN_VERSION_CHECK = getattr(settings, + 'CONSTANCE_IGNORE_ADMIN_VERSION_CHECK', + False)