From: Magnus Hagander Date: Wed, 2 Sep 2015 11:19:48 +0000 (+0200) Subject: Show the start and end date of commitfests X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/%20%22mailto:postgres95%40openlink.co.uk%22?a=commitdiff_plain;h=b557b45047b0f0f0d64a66d91030801929f39ea5;p=pgcommitfest2.git Show the start and end date of commitfests Per request --- diff --git a/pgcommitfest/commitfest/models.py b/pgcommitfest/commitfest/models.py index 23fe1fb..a987e2a 100644 --- a/pgcommitfest/commitfest/models.py +++ b/pgcommitfest/commitfest/models.py @@ -42,6 +42,12 @@ class CommitFest(models.Model): def statusstring(self): return [v for k,v in self._STATUS_CHOICES if k==self.status][0] + @property + def periodstring(self): + if self.startdate and self.enddate: + return "{0} - {1}".format(self.startdate, self.enddate) + return "" + @property def title(self): return "Commitfest %s" % self.name diff --git a/pgcommitfest/commitfest/templates/home.html b/pgcommitfest/commitfest/templates/home.html index 461bc28..e23a558 100644 --- a/pgcommitfest/commitfest/templates/home.html +++ b/pgcommitfest/commitfest/templates/home.html @@ -7,7 +7,7 @@ The following commitfests exist in the system.