I have a table in a view that css does not display. I assume this is a stupid mistake, but I cannot find a solution in my way :(
View:
class ContactsTable(tables.Table): selection = tables.CheckBoxColumn(accessor="id") class Meta: model = Contact exclude = ("id", "civilite", "ad1", "ad2", "cp") sequence =("selection", "nom", "prenom", "comments", "telport", "telfixe", "email", "ville", "regime") def ListContacts(request): table = ContactsTable(Contact.objects.all()) RequestConfig(request).configure(table) return render(request, "contacts/contact_list.html", {'table': table})
Template:
{% load render_table from django_tables2 %} <html> <head> <link rel="stylesheet" href="{{ STATIC_URL }}django_tables2/themes/paleblue/css/screen.css" /> </head> <body> {% render_table table %} </body> </html>
Sorry for my poor english and noobie question.
source share