1👍
✅
You can’t send a data structure like this via standard form parameters. You need to serialize it to JSON before sending, and then deserialize it in the view.
Change the data
parameter as follows:
data: {
'radinput_Aj' : JSON.stringify(fun()),
'csrfmiddlewaretoken': $("input[name=csrfmiddlewaretoken]").val()
},
and the view:
if request.method == "POST":
data = request.POST.get('radinput_Aj')
radinputV = json.loads(data)
Source:stackexchange.com