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 | |
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')
-rw-r--r-- | django/contrib/admin/options.py | 2 | ||||
-rw-r--r-- | django/contrib/admin/sites.py | 6 | ||||
-rw-r--r-- | django/contrib/admin/templates/admin/auth/user/add_form.html | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 1f8ff6dbd1..d44a5121f8 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -501,7 +501,7 @@ class ModelAdmin(BaseModelAdmin): # Convert the actions into a SortedDict keyed by name # and sorted by description. - actions.sort(lambda a,b: cmp(a[2].lower(), b[2].lower())) + actions.sort(key=lambda k: k[2].lower()) actions = SortedDict([ (name, (func, name, desc)) for func, name, desc in actions 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], diff --git a/django/contrib/admin/templates/admin/auth/user/add_form.html b/django/contrib/admin/templates/admin/auth/user/add_form.html index b57f59b82e..c8889eb069 100644 --- a/django/contrib/admin/templates/admin/auth/user/add_form.html +++ b/django/contrib/admin/templates/admin/auth/user/add_form.html @@ -2,8 +2,11 @@ {% load i18n %} {% block form_top %} + {% if not is_popup %} <p>{% trans "First, enter a username and password. Then, you'll be able to edit more user options." %}</p> - <input type="hidden" name="_continue" value="1" /> + {% else %} + <p>{% trans "Enter a username and password." %}</p> + {% endif %} {% endblock %} {% block after_field_sets %} |