diff options
-rw-r--r-- | archaeological_finds/models_finds.py | 1 | ||||
-rw-r--r-- | archaeological_finds/views.py | 7 | ||||
-rw-r--r-- | ishtar_common/templatetags/window_tables.py | 1 |
3 files changed, 7 insertions, 2 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 16287016b..c83e78eaa 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -2688,6 +2688,7 @@ class FindInsideContainer(models.Model): "find__" + Find.EXTRA_REQUEST_KEYS[k] for k in Find.EXTRA_REQUEST_KEYS.keys() } + SLUG = "find_inside_container" find = models.OneToOneField( Find, verbose_name=_("Find"), related_name="inside_container", diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py index cf82cceb8..c843f02d2 100644 --- a/archaeological_finds/views.py +++ b/archaeological_finds/views.py @@ -67,8 +67,11 @@ def get_table_cols_for_ope(): def get_table_cols_for_container(): - table_col = get_table_cols_for_ope() - return ["find__" + tc for tc in table_col] + table_cols = models.Find.TABLE_COLS + tb_key = ("find", 'TABLE_COLS') + if tb_key in settings.TABLE_COLS: + table_cols = settings.TABLE_COLS[tb_key] + return ["find__" + tc for tc in table_cols] get_find_for_ope = get_item(models.Find, 'get_find', 'find', diff --git a/ishtar_common/templatetags/window_tables.py b/ishtar_common/templatetags/window_tables.py index 078afca62..a46f404ba 100644 --- a/ishtar_common/templatetags/window_tables.py +++ b/ishtar_common/templatetags/window_tables.py @@ -23,6 +23,7 @@ from archaeological_finds.models import Find, FindUpstreamTreatments, \ FindInsideContainer from archaeological_warehouse.models import Container, Warehouse + register = template.Library() |