[Fixed]-Django-datatable default iDisplayLength

1๐Ÿ‘

โœ…

I can see from their source code: class TableOptions which is used for meta options and can be accessed for the same to set different properties.

So as I see it, adding a Meta can help you, like this:

class AjaxTable(Table):
    id = Column(field='id', header=u'#')
    name = Column(field='name', header=u'NAME')
    organization = Column(field='organization.name', header=u'ORG')

    class Meta:
        model = Person
        ajax = True
        page_length = 100  # Add this and see

The page_length is the set of options that I could see inside the TableOptions

๐Ÿ‘คNagaraj Tantri

Leave a comment