From dfad3d4b9d7779b5fcd125260021d9f008a68a4f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 1 Dec 2020 13:33:21 +0100 Subject: Context records: show find inside related context records --- archaeological_finds/views.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'archaeological_finds/views.py') diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py index c843f02d2..4e4103224 100644 --- a/archaeological_finds/views.py +++ b/archaeological_finds/views.py @@ -66,6 +66,13 @@ def get_table_cols_for_ope(): return settings.TABLE_COLS[tb_key] +def get_table_cols_for_cr(): + tb_key = (models.Find.SLUG, "TABLE_COLS_FOR_CR") + if tb_key not in settings.TABLE_COLS: + return models.Find.TABLE_COLS_FOR_CR + return settings.TABLE_COLS[tb_key] + + def get_table_cols_for_container(): table_cols = models.Find.TABLE_COLS tb_key = ("find", 'TABLE_COLS') @@ -77,6 +84,10 @@ def get_table_cols_for_container(): get_find_for_ope = get_item(models.Find, 'get_find', 'find', own_table_cols=get_table_cols_for_ope()) + +get_find_for_cr = get_item(models.Find, 'get_find', 'find', + own_table_cols=get_table_cols_for_cr()) + get_find_for_treatment = get_item( models.Find, 'get_find', 'find', own_table_cols=get_table_cols_for_ope(), base_request={}) -- cgit v1.2.3