Python

Python

Made by DeepSource

HttpResponse used to return JSON response PYL-R5101

Anti-pattern
Major

It is recommended to use JsonResponse to return JSON data instead of HttpResponse. HttpResponse(json.dumps(data)) can be replaced with JsonResponse(data), where data is a JSON-serializable object.