From 48426e9321849d0e5f1d736561111d54bec0a5cc Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sat, 28 Sep 2024 16:01:23 +0200 Subject: ✨ Archaeological files templates: add fields for preventive document rendering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ishtar_common/utils.py') diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index 9aee643c4..bca7ce181 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -108,6 +108,15 @@ def debug_line_no(): return currentframe().f_back.f_lineno +class InlineClass: + """ + Dynamic class used in templates + """ + def __init__(self, dct): + for k in dct: + setattr(self, k, dct[k]) + + def fake_task(*args): def fake(func): return func -- cgit v1.2.3