From 84eb346501cf23cb9430230ce192b7192a1f9f13 Mon Sep 17 00:00:00 2001 From: Jenny Danzmayr Date: Mon, 16 Sep 2024 13:21:29 +0200 Subject: [PATCH] string representation for models using titled mixin --- src/c3nav/mapdata/models/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/c3nav/mapdata/models/base.py b/src/c3nav/mapdata/models/base.py index 66b5ecac..d526c8a1 100644 --- a/src/c3nav/mapdata/models/base.py +++ b/src/c3nav/mapdata/models/base.py @@ -88,6 +88,9 @@ class TitledMixin(SerializableMixin, models.Model): result['display'].append((language, title)) return result + def __str__(self): + return str(self.title) + class BoundsMixin(SerializableMixin, models.Model): bottom = models.DecimalField(_('bottom coordinate'), max_digits=6, decimal_places=2)