Opened 14 years ago

Closed 14 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: no UI/UX: no

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 by Raydiation, 14 years ago

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

comment:2 by Jacob, 14 years ago

Resolution: wontfix
Status: newclosed

"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