Add alert when settings are changed
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -34,6 +34,14 @@
|
||||
{% endif %}
|
||||
{% block messages %}
|
||||
{% endblock %}
|
||||
|
||||
{% smart_settings_check_changed as settings_changed %}
|
||||
{% if settings_changed %}
|
||||
<div class="alert alert-dismissible alert-warning">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<p><strong>{% trans 'Warning' %}</strong> {% trans 'Settings updated, restart your installation for changes to take proper effect.' %}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -115,8 +115,6 @@ class Setting(object):
|
||||
if not cls._cache_hash:
|
||||
cls._cache_hash = cls.get_hash()
|
||||
|
||||
print("!!!@@", cls._cache_hash, cls.get_hash())
|
||||
|
||||
return cls._cache_hash != cls.get_hash()
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -13,6 +13,6 @@ def smart_setting(global_name):
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def smart_settings_check_changes():
|
||||
def smart_settings_check_changed():
|
||||
return Setting.check_changed()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user