I'm using django-tables2 to render my data in tables in the template.. everything is rendered fine with pagination..
The Designer of our company wants to change the Display of data into blocks instead of simple table. the following picture may explain more.
I Want to ask if I can use Django tables2 in this case ..since I don't want to loose the pagination
Is it possible to custom the django_tables2/table.html
file to only fit this case (because I'm using django-tables2 in many other pages in the project)?
Any other ideas may be helpful.
Thanks in advance :)
I was having the same requirement and i had been able to do it. To achieve the desired results i have used bootstrap4 and modified the "django_tables2/bootstrap4.html" template. My modified template only displays blocks which can further be enhanced by embedding more css in it.
Yes, you can create a custom template (based on
django_tables2/table.html
) and set a specific table's template Meta attribute to its path:or use the
template
argument to theTable
constructor:or use the second argument of the
{% render_table %}
templatetag: