Changed UserFieldRenderer to leverage User.display_name.

This commit is contained in:
Lance Edgar 2013-11-22 14:39:47 -08:00
parent 8aaff93ff7
commit d838203ec7

View file

@ -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''