phantasmobile/app/item/utils.py

9 lines
194 B
Python
Raw Normal View History

2023-07-24 11:05:45 +00:00
import json
from django.http import Http404, HttpResponse
def render_to_json(response):
content = json.dumps(response)
return HttpResponse(content, 'application/json; charset=utf-8')