From acbaf3386a2215f4be10af9693fe2ca977abfc90 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 20 Feb 2020 14:41:05 +0100 Subject: Templates: add "name" (with no department code) for town --- ishtar_common/models.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ishtar_common') 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: -- cgit v1.2.3