You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have a django application where I want to make POST by clicking on <button> which is not in <form>
The problem is that data sent to view function are not being sent properly.
I cannot access request.POST data because the key is entire dict and value empty list: <QueryDict: {u'{"obj_id":"182","content_type":"video","like":true}': [u'']}>
The text was updated successfully, but these errors were encountered:
The problem is that objects are serialized to JSON by default while you need to send the data in the `application/x-www-form-urlencoded' format. The easiest solution is to use a library like qs:
Hello,
I have a django application where I want to make POST by clicking on
<button>
which is not in<form>
The problem is that data sent to view function are not being sent properly.
Here is axios code:
and here view code:
I cannot access request.POST data because the key is entire dict and value empty list:
<QueryDict: {u'{"obj_id":"182","content_type":"video","like":true}': [u'']}>
The text was updated successfully, but these errors were encountered: