Skip to content

Commit

Permalink
feat: add Django 4.0 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jerivas committed Dec 30, 2021
1 parent d77345a commit 0d16101
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions grappelli_safe/templates/admin/change_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@
<div id="changelist-filter">

<!-- Results -->
{% ifnotequal cl.result_count cl.full_result_count %}
{% if cl.result_count != cl.full_result_count %}
<div class="module results">
<h2>{% trans 'Results' %}</h2>
<div class="form-row">
<p>{% blocktrans with cl.result_count as counter %}{{ counter }} found{% endblocktrans %}</p>
<a href="?{% if cl.is_popup %}_popup=1{% endif %}">{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</a>
</div>
</div>
{% endifnotequal %}
{% endif %}

<!-- Search -->
{% block search %}{% search_form cl %}{% endblock %}
Expand Down
4 changes: 2 additions & 2 deletions grappelli_safe/templates/admin/pagination.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{% load admin_list i18n %}

<p class="paginator">
{{ cl.result_count }} {% ifequal cl.result_count 1 %}{{ cl.opts.verbose_name|escape }}{% else %}{{ cl.opts.verbose_name_plural }}{% endifequal %}
{{ cl.result_count }} {% if cl.result_count == 1 %}{{ cl.opts.verbose_name|escape }}{% else %}{{ cl.opts.verbose_name_plural }}{% endif %}
{% if pagination_required %}
<span class="separator">&nbsp;</span>
{% for i in page_range %}
{% paginator_number cl i %}
{% endfor %}
{% endif %}
{% if show_all_url %}<a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a>{% endif %}
</p>
</p>
2 changes: 1 addition & 1 deletion grappelli_safe/templates/admin/search_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h2>{% trans 'Search' %}</h2>
</div>
</div>
{% for pair in cl.params.items %}
{% ifnotequal pair.0 search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}"/>{% endifnotequal %}
{% if pair.0 != search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}"/>{% endif %}
{% endfor %}
</form>
</div>
Expand Down

0 comments on commit 0d16101

Please sign in to comment.