diff options
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 15 |
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'): |