Opened 6 years ago

Closed 6 years ago

#13031 closed (wontfix)

User class in the auth module should return lastname and firstname as unicode representation

Reported by: Raydiation Owned by: nobody
Component: contrib.auth Version: 1.1
Severity: Keywords: unicode, firstname, lastname
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Its quite annoying to get the Loginname as representation of the User. Normally you identify Users by their first and lastname and you if you got users with the exact same name just return the loginname too. The unicode method should do something like this:

class User(object):
    
    __unicode__(self):
        if completeName.unique(): # checks if the last and first name identify the user
            return "%s %s" % (self.last_name, self.first_name)
        else:
            return "%s %s (%s)" % (self.last_name, self.first_name, self.username)

Change History (2)

comment:1 Changed 6 years ago by Raydiation

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from User class in the auth module should return lastname and firstname as representation to User class in the auth module should return lastname and firstname as unicode representation

comment:2 Changed 6 years ago by jacob

  • Resolution set to wontfix
  • Status changed from new to closed

"Annoying" is a matter of taste: I'd find this patch annoying, myself. We built the bikeshed and painted it this color; there's no real gain to change it now.

Note: See TracTickets for help on using tickets.
Back to Top