Answer the question
In order to leave comments, you need to log in
Why doesn't rest_framework want to parse json?
There is a function that accepts json
@csrf_exempt
def update(request):
if request.method == 'POST':
try:
data = JSONParser().parse(request)
(Pdb) !JSONParser().parse(request)
*** rest_framework.exceptions.ParseError: JSON parse error - Expecting value: line 1 column 1 (char 0)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question