diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-03-13 15:18:13 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-03-13 15:18:13 +0100 |
commit | f24383496f378392a378c99f22695c0f2a73dc2a (patch) | |
tree | 1117c82af80da844ad62b2758e812796948e2d80 /archaeological_operations/models.py | |
parent | e90c8378415c5ee394a220890a07615d1f4b011e (diff) | |
download | Ishtar-f24383496f378392a378c99f22695c0f2a73dc2a.tar.bz2 Ishtar-f24383496f378392a378c99f22695c0f2a73dc2a.zip |
Sheet operation: add INSEE code to towns (refs #3506)
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() |