summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-08-19 13:09:51 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-08-19 13:09:51 +0200
commit1f1d9e31a0a3856a64912d1f5592b3cc57646e76 (patch)
treec4885502aec18a4f3e2a767a0e260c083400f23d /ishtar_common/models.py
parent681a21282b66d9bde3bc49f56de825f6de2687dc (diff)
downloadIshtar-1f1d9e31a0a3856a64912d1f5592b3cc57646e76.tar.bz2
Ishtar-1f1d9e31a0a3856a64912d1f5592b3cc57646e76.zip
Person sheet: improve display of documents (refs #2944)
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 97e578f01..6438a1f2c 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -2336,6 +2336,21 @@ class Person(Address, Merge, OwnPerms, ValueGetter):
if getattr(self, attr)]
return slugify(u"-".join(values))
+ def operation_docs_q(self):
+ from archaeological_operations.models import OperationSource
+ return OperationSource.objects.filter(
+ authors__person=self)
+
+ def contextrecord_docs_q(self):
+ from archaeological_context_records.models import ContextRecordSource
+ return ContextRecordSource.objects.filter(
+ authors__person=self)
+
+ def find_docs_q(self):
+ from archaeological_finds.models import FindSource
+ return FindSource.objects.filter(
+ authors__person=self)
+
def save(self, *args, **kwargs):
super(Person, self).save(*args, **kwargs)
if hasattr(self, 'responsible_town_planning_service'):