From a0b015ba094c7217af2b3f4104101bdff193ba5e Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sat, 14 Sep 2013 14:00:47 +0200 Subject: [PATCH] Make the list-of-lists page more complete Lift the code for showing it form the main website, and a later commit will change the main website to redirect to this page instead. --- django/archives/mailarchives/models.py | 6 +++ .../archives/mailarchives/templates/base.html | 1 + .../mailarchives/templates/index.html | 44 +++++++++++++++---- 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/django/archives/mailarchives/models.py b/django/archives/mailarchives/models.py index aaa7d61..c857a74 100644 --- a/django/archives/mailarchives/models.py +++ b/django/archives/mailarchives/models.py @@ -72,6 +72,12 @@ class List(models.Model): active = models.BooleanField(null=False, blank=False) group = models.ForeignKey(ListGroup, db_column='groupid') + @property + def maybe_shortdesc(self): + if self.shortdesc: + return self.shortdesc + return self.listname + class Meta: db_table = 'lists' diff --git a/django/archives/mailarchives/templates/base.html b/django/archives/mailarchives/templates/base.html index b2e494b..ef4ba47 100644 --- a/django/archives/mailarchives/templates/base.html +++ b/django/archives/mailarchives/templates/base.html @@ -87,6 +87,7 @@
  • Contributors
  • Mailing Lists