oxdata/utils/shortcuts.py

10 lines
275 B
Python
Raw Normal View History

2009-07-13 12:32:01 +00:00
# -*- 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)