enhance User.__str__ with get_full_name
This commit is contained in:
parent
3c8f1c58c5
commit
74135f8877
1 changed files with 1 additions and 3 deletions
|
@ -211,9 +211,7 @@ class UserProfileAdmin(UserAdmin):
|
|||
# FIXME: This is absolutely horrible.
|
||||
def user_str(self):
|
||||
if self.first_name and self.last_name:
|
||||
return "{} {} ({})".format(
|
||||
self.first_name, self.last_name, self.username
|
||||
)
|
||||
return "{} ({})".format(self.get_full_name(), self.username)
|
||||
else:
|
||||
return self.username
|
||||
User.__str__ = user_str
|
||||
|
|
Loading…
Reference in a new issue