summaryrefslogtreecommitdiff
path: root/pgweb/docs/models.py
diff options
context:
space:
mode:
authorJonathan S. Katz2021-05-19 20:00:10 +0000
committerJonathan S. Katz2021-05-19 20:00:10 +0000
commit0a9a46e0144b36c6702454f7b44010b2074d7341 (patch)
tree151625a28310d5e1469a3ced4144e68f3247fb63 /pgweb/docs/models.py
parent5f2b72a3df8721f2e4ce09c63150ae1d5f252087 (diff)
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.
Diffstat (limited to 'pgweb/docs/models.py')
-rw-r--r--pgweb/docs/models.py3
1 files changed, 3 insertions, 0 deletions
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"