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 # Hide selection checkboxes
if 'pk' in table.base_columns: if 'pk' in table.base_columns:
table.columns.hide('pk') table.columns.hide('pk')
oob_swaps = []
applied_filters = render_to_string('inc/applied_filters_pane.html', { oob_swaps.append(render_to_string('inc/applied_filters_pane.html', {
'model': model, 'model': model,
'filter_form': filterset_form, 'filter_form': filterset_form,
}, request) }, request))
return render(request, 'htmx/table.html', { return render(request, 'htmx/table.html', {
'table': table, 'table': table,
'applied_filters': applied_filters, 'oob_swaps': "".join(oob_swaps),
}) })
context = { context = {

View File

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