Hello there, i'm trying to use datatable with django and return a json to my datatable with ajax like this man does it: http://datatables.net/development/server-side/django
It was working with my own files until i wanted to upgrade jquery and datatables.js, he was using an old version (jquery 1.3.2)
If i put recent jquery and datatables files, i get an error 500 while returning the json:
MultiValueDictKeyError at /ajax/get-countries-list/
"Key 'iSortDir_0' not found in <QueryDict: {u'bSearchable_2': [u'true'], u'bSearchable_3': [u'true'], u'bSearchable_0': [u'true'], u'bSearchable_1': [u'true'], u'bSortable_0': [u'true'], u'bSortable_1': [u'true'], u'bSearchable_4': [u'true'], u'bSearchable_5': [u'true'], u'sSortDir_0': [u'asc'], u'mDataProp_2': [u'2'], u'bSortable_4': [u'true'], u'bSortable_2': [u'true'], u'bSortable_3': [u'true'], u'bSortable_5': [u'true'], u'iSortCol_0': [u'0'], u'sSearch': [u''], u'sEcho': [u'1'], u'iColumns': [u'6'], u'_': [u'1353579635421'], u'iDisplayLength': [u'10'], u'sSearch_5': [u''], u'sSearch_4': [u''], u'sSearch_3': [u''], u'sSearch_2': [u''], u'sSearch_1': [u''], u'sSearch_0': [u''], u'mDataProp_4': [u'4'], u'mDataProp_5': [u'5'], u'mDataProp_0': [u'0'], u'mDataProp_1': [u'1'], u'iDisplayStart': [u'0'], u'mDataProp_3': [u'3'], u'bRegex_2': [u'false'], u'bRegex_3': [u'false'], u'bRegex_0': [u'false'], u'bRegex_1': [u'false'], u'bRegex_4': [u'false'], u'bRegex_5': [u'false'], u'sColumns': [u''], u'bRegex': [u'false'], u'iSortingCols': [u'1']}>"
Any idea of how i can fix it? Is it possible or should i just use old version? =/
Thanks a lot.
It was working with my own files until i wanted to upgrade jquery and datatables.js, he was using an old version (jquery 1.3.2)
If i put recent jquery and datatables files, i get an error 500 while returning the json:
MultiValueDictKeyError at /ajax/get-countries-list/
"Key 'iSortDir_0' not found in <QueryDict: {u'bSearchable_2': [u'true'], u'bSearchable_3': [u'true'], u'bSearchable_0': [u'true'], u'bSearchable_1': [u'true'], u'bSortable_0': [u'true'], u'bSortable_1': [u'true'], u'bSearchable_4': [u'true'], u'bSearchable_5': [u'true'], u'sSortDir_0': [u'asc'], u'mDataProp_2': [u'2'], u'bSortable_4': [u'true'], u'bSortable_2': [u'true'], u'bSortable_3': [u'true'], u'bSortable_5': [u'true'], u'iSortCol_0': [u'0'], u'sSearch': [u''], u'sEcho': [u'1'], u'iColumns': [u'6'], u'_': [u'1353579635421'], u'iDisplayLength': [u'10'], u'sSearch_5': [u''], u'sSearch_4': [u''], u'sSearch_3': [u''], u'sSearch_2': [u''], u'sSearch_1': [u''], u'sSearch_0': [u''], u'mDataProp_4': [u'4'], u'mDataProp_5': [u'5'], u'mDataProp_0': [u'0'], u'mDataProp_1': [u'1'], u'iDisplayStart': [u'0'], u'mDataProp_3': [u'3'], u'bRegex_2': [u'false'], u'bRegex_3': [u'false'], u'bRegex_0': [u'false'], u'bRegex_1': [u'false'], u'bRegex_4': [u'false'], u'bRegex_5': [u'false'], u'sColumns': [u''], u'bRegex': [u'false'], u'iSortingCols': [u'1']}>"
Any idea of how i can fix it? Is it possible or should i just use old version? =/
Thanks a lot.