From 4800696f20614bd2017d671a1b28df55f9952345 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sat, 14 Feb 2015 12:52:53 +0100 Subject: [PATCH] Show full name in patch history, not just username Noted by Stefan - we did this for everything except the patch history, so let's make it consistent. --- pgcommitfest/commitfest/models.py | 4 ++++ pgcommitfest/commitfest/templates/patch.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pgcommitfest/commitfest/models.py b/pgcommitfest/commitfest/models.py index 124af72..e1b83b4 100644 --- a/pgcommitfest/commitfest/models.py +++ b/pgcommitfest/commitfest/models.py @@ -183,6 +183,10 @@ class PatchHistory(models.Model): by = models.ForeignKey(User, blank=False, null=False) what = models.CharField(max_length=500, null=False, blank=False) + @property + def by_string(self): + return "%s %s (%s)" % (self.by.first_name, self.by.last_name, self.by.username) + def __unicode__(self): return "%s - %s" % (self.patch.name, self.date) diff --git a/pgcommitfest/commitfest/templates/patch.html b/pgcommitfest/commitfest/templates/patch.html index 97ac9b5..ab66df4 100644 --- a/pgcommitfest/commitfest/templates/patch.html +++ b/pgcommitfest/commitfest/templates/patch.html @@ -95,7 +95,7 @@ {%for h in patch.history %} {{h.date}} - {{h.by}} + {{h.by_string}} {{h.what}} {%endfor%} -- 2.39.5