[1.8.x] Fixed #24411 -- Avoided dict key/method clash in admin delete views.
Backport of 47b35b1844
from master
This commit is contained in:
parent
278b698794
commit
dfcdf64d47
|
@ -68,7 +68,7 @@ def delete_selected(modeladmin, request, queryset):
|
||||||
title=title,
|
title=title,
|
||||||
objects_name=objects_name,
|
objects_name=objects_name,
|
||||||
deletable_objects=[deletable_objects],
|
deletable_objects=[deletable_objects],
|
||||||
model_count=dict(model_count),
|
model_count=dict(model_count).items(),
|
||||||
queryset=queryset,
|
queryset=queryset,
|
||||||
perms_lacking=perms_needed,
|
perms_lacking=perms_needed,
|
||||||
protected=protected,
|
protected=protected,
|
||||||
|
|
|
@ -1730,7 +1730,7 @@ class ModelAdmin(BaseModelAdmin):
|
||||||
object_name=object_name,
|
object_name=object_name,
|
||||||
object=obj,
|
object=obj,
|
||||||
deleted_objects=deleted_objects,
|
deleted_objects=deleted_objects,
|
||||||
model_count=dict(model_count),
|
model_count=dict(model_count).items(),
|
||||||
perms_lacking=perms_needed,
|
perms_lacking=perms_needed,
|
||||||
protected=protected,
|
protected=protected,
|
||||||
opts=opts,
|
opts=opts,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
<h2>{% trans "Summary" %}</h2>
|
<h2>{% trans "Summary" %}</h2>
|
||||||
<ul>
|
<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>
|
<li>{{ model_name|capfirst }}: {{ object_count }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
Loading…
Reference in New Issue