My Django project has a page that features a table powered by DataTables. In this case, the table uses server-side processing using a Django view and the GET http method. The Django view unpacks the query string into a QueryDict object, and my task is to unpack the DataTables parameters for each column of the table from this QueryDict. Note that I must use GET, not POST, because I want to use the POST method for other things that actually change data on the server.
DataTables submits data for each column in the table relating to search strings and sorting for each column. This data is submitted as per their documentation here; the main point is that columnar params are sent up in the query string like this:
...&column[5][search][value]=searchme&column[6][search][value]=more&...
I would like this to be unpacked in such a way that the resultant data structure looks something like this:
column = [
{
'search': {
'value': 'searchme'
}
},
...
]
...With the elements of the array submitted in the query string in the order specified by their indices.
Is there a standard way of accomplishing this with Django's QueryDict?