diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-02-20 14:41:05 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-02-20 14:41:05 +0100 |
commit | 7a4137207fd993207196625b0d20579b49025857 (patch) | |
tree | 34f7a7edbd22b7c6d6967225fda765a0e81e962a /ishtar_common | |
parent | 5dc9bc7b7b3d9851c2e3613954c60933e795bf12 (diff) | |
download | Ishtar-7a4137207fd993207196625b0d20579b49025857.tar.bz2 Ishtar-7a4137207fd993207196625b0d20579b49025857.zip |
Templates: add "name" (with no department code) for town
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/models.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index f6f824d73..7238d7782 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3742,6 +3742,13 @@ class Town(Imported, models.Model): 'year': self.year or ""} return values + def get_values(self, prefix='', no_values=False, no_base_finds=True): + return { + prefix or "label": str(self), + prefix + "name": self.name, + prefix + "numero_insee": self.numero_insee + } + @classmethod def history_decompress(cls, full_value, create=False): if not full_value: |