From d838203ec7c2f3dec5e8006959258e228eea657d Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 22 Nov 2013 14:39:47 -0800 Subject: [PATCH] Changed `UserFieldRenderer` to leverage `User.display_name`. --- tailbone/forms/renderers/people.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tailbone/forms/renderers/people.py b/tailbone/forms/renderers/people.py index dfaa397d..c6c6e5fc 100644 --- a/tailbone/forms/renderers/people.py +++ b/tailbone/forms/renderers/people.py @@ -85,4 +85,8 @@ class UserFieldRenderer(TextFieldRenderer): Renderer for :class:`rattail.db.model.User` instance fields. """ - pass + def render_readonly(self, **kwargs): + user = self.raw_value + if user: + return user.display_name + return u''