Commit de1a7e54 by Kálmán Viktor

dashboard: unicode for profile

parent fa2b6d03
...@@ -106,6 +106,19 @@ class Profile(Model): ...@@ -106,6 +106,19 @@ class Profile(Model):
else: else:
return static("dashboard/img/avatar.png") return static("dashboard/img/avatar.png")
def get_display_name(self):
if self.user.get_full_name():
name = self.user.get_full_name()
else:
name = self.user.username
if self.org_id:
name = "%s (%s)" % (name, self.org_id)
return name
def __unicode__(self):
return self.get_display_name()
class GroupProfile(AclBase): class GroupProfile(AclBase):
ACL_LEVELS = ( ACL_LEVELS = (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment