0

How to get array paramaters posted to django backend? I am using a jQuery plugin (DataTables Editor) that POSTs a data array parameter like

data[id][fieldname][value]

How do I get django to accept and use these parameters.

King Leon
  • 1,154
  • 12
  • 21
  • Click the link below to find the answer. https://stackoverflow.com/a/12101665/7596326 – Alvin Lau Oct 30 '17 at 16:02
  • I saw and tried the solution in the link `request.POST.getlist('data')` and it returns an empty array even though the data is there. – King Leon Oct 30 '17 at 22:17

1 Answers1

0

you can use request.POST.getlist('data[]')

Ram Sharma
  • 8,676
  • 7
  • 43
  • 56