Reload settings values "live" (without a page refresh)

This commit is contained in:
Oliver committed 2021-07-27 17:03:37 +10:00
1 parent 46d5a6f00b
commit 990b987692
3 files changed
+47 -10

No files matched your search

+17
View File
@@ -50,6 +50,23 @@ class SettingEdit(AjaxUpdateView):
return ctx
def get_data(self):
"""
Custom data to return to the client after POST success
"""
data = {}
setting = self.get_object()
data['pk'] = setting.pk
data['key'] = setting.key
data['value'] = setting.value
data['is_bool'] = setting.is_bool()
data['is_int'] = setting.is_int()
return data
def get_form(self):
"""
Override default get_form behaviour