summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_finds.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2025-02-12 11:21:56 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-02-19 14:45:57 +0100
commit17d286b114f003c4dbf7865d668ab41b63bcec4f (patch)
tree64147de58a77abb71409fb5b1e71a61b9405512c /archaeological_finds/models_finds.py
parent7313642f0ebcdfc83cc1d28906e618489594e8a9 (diff)
downloadIshtar-17d286b114f003c4dbf7865d668ab41b63bcec4f.tar.bz2
Ishtar-17d286b114f003c4dbf7865d668ab41b63bcec4f.zip
✨ exhibtion: add description field - basket sheet: display associated exhibitions
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r--archaeological_finds/models_finds.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index e1c4e2f71..f49685199 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -973,6 +973,15 @@ class FindBasket(Basket, MainItem, ValueGetter):
def treatment_files_list(self):
return list(self.treatment_files.all())
+ @property
+ def exhibitions(self):
+ Exhibition = apps.get_model("archaeological_finds", "Exhibition")
+ return Exhibition.objects.filter(associated_basket_id=self.pk)
+
+ @property
+ def exhibitions_list(self):
+ return list(self.exhibitions.all())
+
def get_values(self, prefix="", no_values=False, filtr=None, **kwargs):
base_exclude = kwargs["exclude"][:] if "exclude" in kwargs else []
base_exclude.append(prefix + "items")
@@ -1041,7 +1050,7 @@ class FindBasket(Basket, MainItem, ValueGetter):
(
reverse("findbasket-add-exhibition", args=[self.pk]),
_("Create exhibition"),
- "fa fa-calendar",
+ "fa fa-users",
"",
"",
False,