Skip to content

Commit

Permalink
Fixed #6089 -- Removed default ordering on the User class.
Browse files Browse the repository at this point in the history
Admin users are still ordered, since we add it in specially for Admin. Slightly
backwards incompatible.

Patch from Erik Karulf.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7806 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Jun 30, 2008
1 parent 415bd69 commit 339df5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/contrib/auth/models.py
Expand Up @@ -96,10 +96,10 @@ class Group(models.Model):
class Meta:
verbose_name = _('group')
verbose_name_plural = _('groups')
ordering = ('name',)

class Admin:
search_fields = ('name',)
ordering = ('name',)

def __unicode__(self):
return self.name
Expand Down Expand Up @@ -153,7 +153,6 @@ class User(models.Model):
class Meta:
verbose_name = _('user')
verbose_name_plural = _('users')
ordering = ('username',)

class Admin:
fields = (
Expand All @@ -166,6 +165,7 @@ class Admin:
list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff')
list_filter = ('is_staff', 'is_superuser')
search_fields = ('username', 'first_name', 'last_name', 'email')
ordering = ('username',)

def __unicode__(self):
return self.username
Expand Down

0 comments on commit 339df5c

Please sign in to comment.