i just want to send a JsonResponse to my browser in djano the code i write is :
def jsontrial(request):
return JsonResponse({"hi":"hello"},safe=False)
but when i run the server i always get the error
"In order to allow non-dict objects to be serialized set the safe parameter to False."
please help me with this new to django
Aucun commentaire:
Enregistrer un commentaire