Ticket #6089: unordered-auth-2.diff

File unordered-auth-2.diff, 981 bytes (added by Erik Karulf, 17 years ago)

Same as above with added ordering in admin

  • contrib/auth/models.py

     
    9696    class Meta:
    9797        verbose_name = _('group')
    9898        verbose_name_plural = _('groups')
    99         ordering = ('name',)
    10099
    101100    class Admin:
    102101        search_fields = ('name',)
     102        ordering = ('name',)
    103103
    104104    def __unicode__(self):
    105105        return self.name
     
    146146    class Meta:
    147147        verbose_name = _('user')
    148148        verbose_name_plural = _('users')
    149         ordering = ('username',)
    150149
    151150    class Admin:
    152151        fields = (
     
    159158        list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff')
    160159        list_filter = ('is_staff', 'is_superuser')
    161160        search_fields = ('username', 'first_name', 'last_name', 'email')
     161        ordering = ('username',)
    162162
    163163    def __unicode__(self):
    164164        return self.username
Back to Top