From 0a9a46e0144b36c6702454f7b44010b2074d7341 Mon Sep 17 00:00:00 2001 From: "Jonathan S. Katz" Date: Wed, 19 May 2021 16:00:10 -0400 Subject: [PATCH] Improve admin preview for doc page redirect This presents the redirection in a legible format, instead of having to click into each list item to figure out what it is. --- pgweb/docs/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pgweb/docs/models.py b/pgweb/docs/models.py index 89e54bd8..9b71f6eb 100644 --- a/pgweb/docs/models.py +++ b/pgweb/docs/models.py @@ -42,5 +42,8 @@ class DocPageRedirect(models.Model): redirect_from = models.CharField(max_length=64, null=False, blank=False, unique=True, help_text='Page to redirect from, e.g. "old_page.html"') redirect_to = models.CharField(max_length=64, null=False, blank=False, unique=True, help_text='Page to redirect to, e.g. "new_page.html"') + def __str__(self): + return "%s => %s" % (self.redirect_from, self.redirect_to) + class Meta: verbose_name_plural = "Doc page redirects" -- 2.39.5