From 60929576a1bb0b45202b7f02905214f8d3af7bf4 Mon Sep 17 00:00:00 2001 From: Florian Hoedt Date: Tue, 5 Nov 2019 11:19:07 +0100 Subject: [PATCH] fixes #5197 added __unicode__ functions for menu and menu items --- geonode/base/models.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/geonode/base/models.py b/geonode/base/models.py index 443f8307412..f82f5bdea21 100644 --- a/geonode/base/models.py +++ b/geonode/base/models.py @@ -1358,6 +1358,8 @@ class MenuPlaceholder(models.Model): blank=False, unique=True ) + def __unicode__(self): + return u"{0}".format(self.name) def __str__(self): return self.name @@ -1379,6 +1381,9 @@ class Menu(models.Model): null=False, ) + def __unicode__(self): + return u"{0}".format(self.title) + def __str__(self): return self.title @@ -1412,6 +1417,9 @@ class MenuItem(models.Model): blank=False ) + def __unicode__(self): + return u"{0}".format(self.title) + def __str__(self): return self.title