From 3e5348bd79ae3575710a8aa9b58589754665d917 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 29 Sep 2016 13:34:00 +0200 Subject: Operation: add a related name for towns - temp maintenance script for de-dup towns --- archaeological_operations/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'archaeological_operations') diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 926e27b3b..0cebcf292 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -212,7 +212,8 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, surface = models.IntegerField(_(u"Surface (m2)"), blank=True, null=True) remains = models.ManyToManyField("RemainType", verbose_name=_(u'Remains'), null=True, blank=True) - towns = models.ManyToManyField(Town, verbose_name=_(u"Towns")) + towns = models.ManyToManyField(Town, verbose_name=_(u"Towns"), + related_name='operations') cost = models.IntegerField(_(u"Cost (euros)"), blank=True, null=True) # preventive periods = models.ManyToManyField(Period, verbose_name=_(u"Periods"), -- cgit v1.2.3