Rename variable for doing OOB swaps on the table

This commit is contained in:
Daniel Sheppard 2024-04-25 12:53:54 -05:00
parent 479c69bd2d
commit 5830ae9e9a
2 changed files with 6 additions and 6 deletions

View File

@ -181,14 +181,14 @@ class ObjectListView(BaseMultiObjectView, ActionsMixin, TableMixin):
# Hide selection checkboxes
if 'pk' in table.base_columns:
table.columns.hide('pk')
applied_filters = render_to_string('inc/applied_filters_pane.html', {
oob_swaps = []
oob_swaps.append(render_to_string('inc/applied_filters_pane.html', {
'model': model,
'filter_form': filterset_form,
}, request)
}, request))
return render(request, 'htmx/table.html', {
'table': table,
'applied_filters': applied_filters,
'oob_swaps': "".join(oob_swaps),
})
context = {

View File

@ -2,8 +2,8 @@
{% load helpers %}
{% load render_table from django_tables2 %}
{# Applied filters for OOB Swap #}
{{ applied_filters }}
{# OOB Swaps to update various components #}
{{ oob_swaps }}
{% with preferences|get_key:"pagination.placement" as paginator_placement %}
{% if paginator_placement == 'top' or paginator_placement == 'both' %}