From 19130981f08faba30336fb57bdd78677753863c7 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 7 Aug 2018 18:31:27 +0200 Subject: Person: add a cached label with organization --- archaeological_operations/models.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'archaeological_operations') 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' -- cgit v1.2.3