forked from DGNum/gestioCOF
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.
|
# FIXME: This is absolutely horrible.
|
||||||
def user_str(self):
|
def user_str(self):
|
||||||
if self.first_name and self.last_name:
|
if self.first_name and self.last_name:
|
||||||
return "{} {} ({})".format(
|
return "{} ({})".format(self.get_full_name(), self.username)
|
||||||
self.first_name, self.last_name, self.username
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
return self.username
|
return self.username
|
||||||
User.__str__ = user_str
|
User.__str__ = user_str
|
||||||
|
|
Loading…
Reference in a new issue