diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-02-13 13:23:29 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-02-13 13:23:29 +0100 |
commit | bf6fa71e7f161896cd114a2033d7688f98d49f8e (patch) | |
tree | aead69cdc27743add5535450c812c8ce9d440584 /ishtar_common/forms.py | |
parent | 5330e9b9622107a17a170cc2d3761dafbf15b8ae (diff) | |
download | Ishtar-bf6fa71e7f161896cd114a2033d7688f98d49f8e.tar.bz2 Ishtar-bf6fa71e7f161896cd114a2033d7688f98d49f8e.zip |
Manage search on json fields - HistorySelect for all concerned forms
Diffstat (limited to 'ishtar_common/forms.py')
-rw-r--r-- | ishtar_common/forms.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py index 754f63f74..d697ee89b 100644 --- a/ishtar_common/forms.py +++ b/ishtar_common/forms.py @@ -273,6 +273,11 @@ class CustomForm(BSForm): @classmethod def _get_json_fields(cls, custom_form): + """ + Return json field list from database configuration + :param custom_form: form concerned + :return: ((order1, key1, field1), ...) + """ fields = [] for field in custom_form.json_fields.order_by('order').all(): key = "data__" + field.json_field.key @@ -299,6 +304,11 @@ class CustomForm(BSForm): @classmethod def check_custom_form(cls, current_user): + """ + Check form customization + :param current_user: + :return: available, excluded_fields, json_fields + """ if not current_user: return True, [], [] base_q = {"form": cls.form_slug, 'available': True} |