Changed UserFieldRenderer
to leverage User.display_name
.
This commit is contained in:
parent
8aaff93ff7
commit
d838203ec7
|
@ -85,4 +85,8 @@ class UserFieldRenderer(TextFieldRenderer):
|
||||||
Renderer for :class:`rattail.db.model.User` instance fields.
|
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''
|
||||||
|
|
Loading…
Reference in a new issue