pinax / symposion

a Django project for conference websites
BSD 3-Clause "New" or "Revised" License
299 stars 147 forks source link

User accounts are represented as hex UIDs in the admin interface #60

Open holdenweb opened 10 years ago

holdenweb commented 10 years ago

Surely it is possible to configure the admin representation of users so they are shown alphabetically, with email addresses attached, as in

Steve Holden (steve@holdenweb.com)

Certain aspects of the admin are rendered difficult at best and useless at worst by the inability to easily identify a user account for drop-down selection.

pdebuyl commented 9 years ago

This relies on the account module. In the models file, redefining the __str__ method in account/models.py to

def __str__(self):
    if len(self.user.first_name)>0 and len(self.user.last_name)>0:
        return u'%s %s (%s)' % (self.user.first_name, self.user.last_name, self.user.email or '')
    else: return u'%s' % self.user.email

updates properly the Home › Account › Accounts panel. It is not the sorting but it helps already.

martey commented 8 years ago

The hex UID issue was fixed by https://github.com/pinax/django-user-accounts/commit/5176583ba7c44bd1d151ce9b11345381411f228b, which added a __str__ method to account.models.Account. Hex UIDs shouldn't appear in django-user-accounts 1.0 or newer, which symposion started using in December 2014 (see 894e7b1b2e65b3b9d36ec981c39a3352826b75de).

I think that this issue should be closed.

ossanna16 commented 8 years ago

@paltman Can this be closed?