summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-08-07 18:31:27 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-08-13 18:26:03 +0200
commit19130981f08faba30336fb57bdd78677753863c7 (patch)
tree13628f76c00eb4ca80a5902ae648da30ed1e4ccd /archaeological_operations/models.py
parentad6fd98f3416d9d9e2686d4607b2feae8ade5383 (diff)
downloadIshtar-19130981f08faba30336fb57bdd78677753863c7.tar.bz2
Ishtar-19130981f08faba30336fb57bdd78677753863c7.zip
Person: add a cached label with organization
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index b9e1d2e20..28bc4614a 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -127,6 +127,7 @@ class ArchaeologicalSite(BaseHistorizedItem):
_(u"Sinking date"), null=True, blank=True)
discovery_area = models.TextField(
_(u"Discovery area"), null=True, blank=True)
+
documents = models.ManyToManyField(
Document, related_name="sites", verbose_name=_(u"Documents"),
blank=True)
@@ -373,6 +374,10 @@ class Operation(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter,
pgettext_lazy(TXT_SEARCH_COMMENT, u"town"),
'towns__cached_label__iexact'
),
+ 'parcel': (
+ pgettext_lazy(TXT_SEARCH_COMMENT, u"parcel"),
+ 'parcels__cached_label__iexact'
+ ),
'towns__numero_insee__startswith': (
pgettext_lazy(TXT_SEARCH_COMMENT, u"department"),
'towns__numero_insee__startswith'
@@ -393,6 +398,10 @@ class Operation(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter,
pgettext_lazy(TXT_SEARCH_COMMENT, u"is-open"),
'end_date__isnull'
),
+ 'in_charge': (
+ pgettext_lazy(TXT_SEARCH_COMMENT, u"in-charge"),
+ 'in_charge__cached_label__iexact'
+ ),
'periods': (
pgettext_lazy(TXT_SEARCH_COMMENT, u"period"),
'periods__pk'