diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-06-30 12:52:46 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-06-30 12:52:46 +0000 |
| commit | 339df5ce446afb1bac8356453a890f89d0220fd6 (patch) | |
| tree | ecff89244972cf7ca3c013ec4c6b496705fab170 | |
| parent | 415bd694f9de8252e8d47bdf3df73cc62ca97728 (diff) | |
Fixed #6089 -- Removed default ordering on the User class.
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
| -rw-r--r-- | django/contrib/auth/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index f74d1d7761..379a9f4c64 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -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 @@ -153,7 +153,6 @@ class User(models.Model): class Meta: verbose_name = _('user') verbose_name_plural = _('users') - ordering = ('username',) class Admin: fields = ( @@ -166,6 +165,7 @@ class User(models.Model): 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 |
