diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2010-08-09 21:22:37 +0000 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2010-08-09 21:22:37 +0000 |
commit | 6001ba016a3db4701d56abc6d30868d4e5d88dbf (patch) | |
tree | 7a42c57d802484300c2384d3cd3a968de1804383 /django/contrib/admin/sites.py | |
parent | c7bd48cb9f645e5ff07d1e68b86130e3bb2b043f (diff) | |
download | django-soc2010/query-refactor.tar.gz |
[soc2010/query-refactor] Merged up to trunk r13556, resolved merge conflictsarchive/soc2010/query-refactorsoc2010/query-refactor
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/query-refactor@13565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/admin/sites.py')
-rw-r--r-- | django/contrib/admin/sites.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py index 4446490451..d0d6473a34 100644 --- a/django/contrib/admin/sites.py +++ b/django/contrib/admin/sites.py @@ -379,11 +379,11 @@ class AdminSite(object): # Sort the apps alphabetically. app_list = app_dict.values() - app_list.sort(lambda x, y: cmp(x['name'], y['name'])) + app_list.sort(key=lambda x: x['name']) # Sort the models alphabetically within each app. for app in app_list: - app['models'].sort(lambda x, y: cmp(x['name'], y['name'])) + app['models'].sort(key=lambda x: x['name']) context = { 'title': _('Site administration'), @@ -443,7 +443,7 @@ class AdminSite(object): if not app_dict: raise http.Http404('The requested admin page does not exist.') # Sort the models alphabetically within each app. - app_dict['models'].sort(lambda x, y: cmp(x['name'], y['name'])) + app_dict['models'].sort(key=lambda x: x['name']) context = { 'title': _('%s administration') % capfirst(app_label), 'app_list': [app_dict], |