diff options
| author | Tim Graham <timograham@gmail.com> | 2015-02-25 07:15:56 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-25 08:07:25 -0500 |
| commit | dfcdf64d475418ed579da2621e331cc4d03a78e5 (patch) | |
| tree | 1c7c49bb83dbbcee2a4daf94f42ebc7fc7724037 /django | |
| parent | 278b6987943d0a610aadc767200651ec5d7d738e (diff) | |
[1.8.x] Fixed #24411 -- Avoided dict key/method clash in admin delete views.
Backport of 47b35b1844b2adc167e64674824873991e9c4c2b from master
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/admin/actions.py | 2 | ||||
| -rw-r--r-- | django/contrib/admin/options.py | 2 | ||||
| -rw-r--r-- | django/contrib/admin/templates/admin/includes/object_delete_summary.html | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/django/contrib/admin/actions.py b/django/contrib/admin/actions.py index 3478145b30..4445dd52fd 100644 --- a/django/contrib/admin/actions.py +++ b/django/contrib/admin/actions.py @@ -68,7 +68,7 @@ def delete_selected(modeladmin, request, queryset): title=title, objects_name=objects_name, deletable_objects=[deletable_objects], - model_count=dict(model_count), + model_count=dict(model_count).items(), queryset=queryset, perms_lacking=perms_needed, protected=protected, diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 8bc50de33c..8176926acb 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -1730,7 +1730,7 @@ class ModelAdmin(BaseModelAdmin): object_name=object_name, object=obj, deleted_objects=deleted_objects, - model_count=dict(model_count), + model_count=dict(model_count).items(), perms_lacking=perms_needed, protected=protected, opts=opts, diff --git a/django/contrib/admin/templates/admin/includes/object_delete_summary.html b/django/contrib/admin/templates/admin/includes/object_delete_summary.html index a2e78ed7a1..6a8bf6542a 100644 --- a/django/contrib/admin/templates/admin/includes/object_delete_summary.html +++ b/django/contrib/admin/templates/admin/includes/object_delete_summary.html @@ -1,7 +1,7 @@ {% load i18n %} <h2>{% trans "Summary" %}</h2> <ul> - {% for model_name, object_count in model_count.items %} + {% for model_name, object_count in model_count %} <li>{{ model_name|capfirst }}: {{ object_count }}</li> {% endfor %} -</ul>
\ No newline at end of file +</ul> |
