I was assigned with a task which required me to understand the following Python code which uses jQuery and datatable:
req = request.GET
sort_col = req['columns[%s][data]' % req['order[0][column]']]
glob_search_val = req['search[value]']
if req['order[0][dir]'] != 'asc':
I'm new to jQuery and datatables. The usage is quite different from how normal Python lists/dictionaries are accessed. For example, order[0][column] apparently is a variable but it's quoted which means a literal in Python. the column in the bracket appears to be a variable, it's again inside quotes and not initialized. In datables documentation order is an 2D array access by index like order[0][0]. I have similar question for data in columns[%s][data] and what does columns[%s][data] return?
Where can I find more information on how columns, order, search (and other) parameters work in Django?