Skip to content

Commit

Permalink
[#902] Added User.get_short_name() for use in admin
Browse files Browse the repository at this point in the history
  • Loading branch information
KasperBrandt committed Nov 7, 2014
1 parent 7210197 commit fa6be7f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions akvo/rsr/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ def get_full_name(self):
return full_name.strip()
get_full_name.short_description = _(u'full name')

def get_short_name(self):
"""
Returns only the first_name, but is needed because the default admin templates use this method.
"""
return self.first_name

def user_name(self):
return self.__unicode__()

Expand Down

0 comments on commit fa6be7f

Please sign in to comment.