You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to have an evolution of this package django-tables2 for some things that can be very useful.
the goal : display several tables on a same page with all the abilities of the SingleTableMixin table.
class PersonTablesView(MultiTableMixin, TemplateView):
template_name = "multiTable.html"
tables = [
PersonHTMxTable(qs1), => from 1 table of person
CityHTMxTable(qs2), => from 1 table of cities
JobHTMxTable(qs3) => from 1 table of jobs
]
table_pagination = {
"per_page": 5
}
2 cases can be very useful:
1 search bar to filter all the tables,
1 search bar for each table displayed if several tables in a page.
I have this needs but i don't find any workaround to solve these 2 problems.
I use HTMx get request in django to define search bar.
In a single table case I can define this kind of class and it's working
class PersonTablesView(SingleTableMixin, FilterView):
table_class = PersonHTMxTable
queryset = Person.objects.all()
filterset_class = PersonFilter => a new class to filter in person table with field of search bar
paginate_by = 5
template_name = "singleTable.html"
My goal is to have this kind of thing working :
class PersonTablesView(MultiTableMixin, TemplateView, FilterView):
template_name = "multiTable.html"
tables = [
PersonHTMxTable(qs1), => from 1 table of person
CityHTMxTable(qs2), => from 1 table of cities
JobHTMxTable(qs3) => from 1 table of jobs
] filters = [ PersonFilter, => a new class to filter in person table with field of search bar CityFilter, => a new class to filter in cities table with field of search bar JobFilter => a new class to filter in jobs table with field of search bar ]
table_pagination = {
"per_page": 5
}
if the same thing allow to search in the 3 filters or if 3 search things are use for each filters could be possible, using
1 or 3 boxes in html like this :
Hello,
Is it possible to have an evolution of this package django-tables2 for some things that can be very useful.
the goal : display several tables on a same page with all the abilities of the SingleTableMixin table.
2 cases can be very useful:
I have this needs but i don't find any workaround to solve these 2 problems.
I use HTMx get request in django to define search bar.
In a single table case I can define this kind of class and it's working
My goal is to have this kind of thing working :
if the same thing allow to search in the 3 filters or if 3 search things are use for each filters could be possible, using
1 or 3 boxes in html like this :
form hx-get="{% url 'my_request_htmx linking python class' %}" hx-target="div.table-container" hx-swap="outerHTML" hx-indicator=".progress" class="d-flex flex-row align-items-center flex-wrap"> /form
So is it possible to have a such evolution in the django-tables2 package ?
Regards
The text was updated successfully, but these errors were encountered: