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
Copy file name to clipboardExpand all lines: README.md
+6-8
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,8 @@ _django_datatables_view_ uses **GenericViews**, so your view should just inherit
23
23
(there is also a DatatableMixin - pure datatables handler that can be used with the mixins of your choice, eg. django-braces). These are:
24
24
25
25
***model** - the model that should be used to populate the datatable
26
-
***columns** - the columns that are going to be displayed. If not defined then django_datatables_view will look for 'name' in the columns definition provided in the request by DataTables, eg.: columnDefs: [{name: 'name', targets: [0]} (only works for datatables 1.10+)
27
-
***order_columns** - list of column names used for sorting (eg. if user sorts by second column then second column name from this list will be used with order by clause). If not defined then django_datatables_view will look for 'name' in the columns definition provided in the request by DataTables, eg.: columnDefs: [{name: 'name', targets: [0]} (only works for datatables 1.10+)
26
+
***columns** - the columns that are going to be displayed. If not defined then django_datatables_view will look for 'data' or 'name' in the columns definition provided in the request by DataTables, eg.: columns: [{data: 'first_name'}] (only works for datatables 1.10+)
27
+
***order_columns** - list of column names used for sorting (eg. if user sorts by second column then second column name from this list will be used with order by clause). If not defined then django_datatables_view will look for 'data' or 'name' in the columns definition provided in the request by DataTables, eg.: columns: [{data: 'first_name'}] (only works for datatables 1.10+)
28
28
***filter_queryset** - if you want to filter your DataTable in some specific way then override this method. In case of older DataTables (pre 1.10) you need to override this method or there will be no filtering.
29
29
***filter_method** - returns 'istartswith' by default, you can override it to use different filtering method, e.g. icontains: return self.FILTER_ICONTAINS
30
30
@@ -173,18 +173,16 @@ This sample assumes that list of columns and order columns is defined on the cli
0 commit comments