Skip to content

Commit

Permalink
Fixed #24411 -- Avoided dict key/method clash in admin delete views.
Browse files Browse the repository at this point in the history
  • Loading branch information
timgraham committed Feb 25, 2015
1 parent 65441bb commit 47b35b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion django/contrib/admin/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/admin/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ def delete_view(self, request, object_id, extra_context=None):
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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
</ul>

0 comments on commit 47b35b1

Please sign in to comment.