diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-05-29 09:06:42 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-06-17 13:21:28 +0200 |
commit | 6399d962fcdfcf0648094e3e6cae155a8a3a967a (patch) | |
tree | 430c6f3424703373bd03df2cafa83400efe8e54a /archaeological_finds/views.py | |
parent | 963af41250b55d0e578c4a4481554323f82516df (diff) | |
download | Ishtar-6399d962fcdfcf0648094e3e6cae155a8a3a967a.tar.bz2 Ishtar-6399d962fcdfcf0648094e3e6cae155a8a3a967a.zip |
Manage alternate configuration for find table col for ope
Diffstat (limited to 'archaeological_finds/views.py')
-rw-r--r-- | archaeological_finds/views.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py index 4bd67e441..b8a23367b 100644 --- a/archaeological_finds/views.py +++ b/archaeological_finds/views.py @@ -20,6 +20,7 @@ from collections import OrderedDict import json +from django.conf import settings from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse from django.db.models import Q @@ -51,8 +52,16 @@ from archaeological_finds import wizards get_find = get_item(models.Find, 'get_find', 'find', search_form=forms.FindSelect) + +def get_table_cols_for_ope(): + tb_key = (models.Find.SLUG, "TABLE_COLS_FOR_OPE") + if tb_key not in settings.TABLE_COLS: + return models.Find.TABLE_COLS_FOR_OPE + return settings.TABLE_COLS[tb_key] + + get_find_for_ope = get_item(models.Find, 'get_find', 'find', - own_table_cols=models.Find.TABLE_COLS_FOR_OPE) + own_table_cols=get_table_cols_for_ope()) get_find_for_treatment = get_item( models.Find, 'get_find', 'find', |