oxdata/utils/shortcuts.py
2009-07-13 14:32:01 +02:00

9 lines
275 B
Python

# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
from django.http import HttpResponse
from django.utils import simplejson
def render_to_json_response(dictionary, content_type="text/json"):
return HttpResponse(simplejson.dumps(dictionary), content_type=content_type)