[Django]-Django_tables2 โ€“ part of css not working

3๐Ÿ‘

โœ…

I saw this in the template tags code:

class OnTheFlyTable(tables.Table):
    class Meta:
        model = queryset.model

which is the default table rendered by django table since it does not include any css class you are seeing any css class in table tag.

Now from the docstrings in the code:

class OnTheFlyTable(tables.Table):
    class Meta:
        model = queryset.model
        attrs = {'class': 'paleblue'}

you have to use something like below to be able to use css classes for tables

References of files from I read this code:

๐Ÿ‘คArpit Solanki

Leave a comment