admin: fix slow load for templates using get_links

This commit is contained in:
Jens Langhammer
2020-05-16 19:00:43 +02:00
parent 5596caedbc
commit df1cb88abc
4 changed files with 21 additions and 18 deletions

View File

@ -47,12 +47,12 @@
<th role="columnheader">
<div>
<div>{{ policy.name }}</div>
{% if not policy.policymodel_set.exists %}
{% if not policy.bindings.exists %}
<i class="pf-icon pf-icon-warning-triangle"></i>
<small>{% trans 'Warning: Policy is not assigned.' %}</small>
{% else %}
<i class="pf-icon pf-icon-ok"></i>
<small>{% blocktrans with object_count=policy.policymodel_set.all|length %}Assigned to {{ object_count }} objects.{% endblocktrans %}</small>
<small>{% blocktrans with object_count=policy.bindings.all|length %}Assigned to {{ object_count }} objects.{% endblocktrans %}</small>
{% endif %}
</div>
</th>