diff options
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index ebe9ae551..57338f81c 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -421,6 +421,10 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms, def show_url(self): return reverse('show-operation', args=[self.pk, '']) + def towns_codes(self): + return [u"{} ({})".format(town.name, town.numero_insee) for town in + self.towns.all()] + def has_finds(self): from archaeological_finds.models import BaseFind return BaseFind.objects.filter(context_record__operation=self).count() |