Closes #21902: Upgrade django-tables2 to v3.0

This commit is contained in:
Jeremy Stretch
2026-04-13 14:17:05 -04:00
parent 58275977bb
commit d57346d9f0
3 changed files with 4 additions and 4 deletions

View File

@@ -6,7 +6,7 @@
<tr> <tr>
{% for column in table.columns %} {% for column in table.columns %}
{% if column.orderable %} {% if column.orderable %}
<th {{ column.attrs.th.as_html }}><a href="{% querystring table.prefixed_order_by_field=column.order_by_alias.next %}">{{ column.header }}</a></th> <th {{ column.attrs.th.as_html }}><a href="{% querystring_replace table.prefixed_order_by_field=column.order_by_alias.next %}">{{ column.header }}</a></th>
{% else %} {% else %}
<th {{ column.attrs.th.as_html }}>{{ column.header }}</th> <th {{ column.attrs.th.as_html }}>{{ column.header }}</th>
{% endif %} {% endif %}

View File

@@ -13,14 +13,14 @@
{% if column.is_ordered %} {% if column.is_ordered %}
<div class="float-end"> <div class="float-end">
<a href="#" <a href="#"
hx-get="{{ table.htmx_url }}{% querystring table.prefixed_order_by_field='' %}" hx-get="{{ table.htmx_url }}{% querystring_replace table.prefixed_order_by_field='' %}"
class="text-danger" class="text-danger"
title="{% trans "Clear ordering" %}" title="{% trans "Clear ordering" %}"
><i class="mdi mdi-close"></i></a> ><i class="mdi mdi-close"></i></a>
</div> </div>
{% endif %} {% endif %}
<a href="#" <a href="#"
hx-get="{{ table.htmx_url }}{% querystring table.prefixed_order_by_field=column.order_by_alias.next %}" hx-get="{{ table.htmx_url }}{% querystring_replace table.prefixed_order_by_field=column.order_by_alias.next %}"
>{{ column.header }}</a> >{{ column.header }}</a>
</th> </th>
{% else %} {% else %}

View File

@@ -12,7 +12,7 @@ django-redis==6.0.0
django-rich==2.2.0 django-rich==2.2.0
django-rq==4.0.1 django-rq==4.0.1
django-storages==1.14.6 django-storages==1.14.6
django-tables2==2.8.0 django-tables2==3.0.0
django-taggit==6.1.0 django-taggit==6.1.0
django-timezone-field==7.2.1 django-timezone-field==7.2.1
djangorestframework==3.16.1 djangorestframework==3.16.1