diff options
author | Leif Johansson <leifj@sunet.se> | 2010-07-08 21:32:05 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2010-07-08 21:32:05 +0200 |
commit | 2bb8b5dd3eee47e665da570eb72cfea87c6ca3fe (patch) | |
tree | 72c79fa02307c1c2e76e93644b82039d51529a52 /coip/multiresponse.py | |
parent | 5a58664f5cf03995c6f35f71812cfcf5637ba76e (diff) |
navigation based on jsTree
Diffstat (limited to 'coip/multiresponse.py')
-rw-r--r-- | coip/multiresponse.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/coip/multiresponse.py b/coip/multiresponse.py index 2e6dc5a..50f987c 100644 --- a/coip/multiresponse.py +++ b/coip/multiresponse.py @@ -3,9 +3,8 @@ import re from django.conf import settings from django.shortcuts import render_to_response from django.http import HttpResponse -from django.core import serializers from coip.apps.userprofile.utils import user_profile -from pprint import pprint +from django.utils import simplejson default_suffix_mapping = {"\.htm(l?)$": "text/html", "\.json$": "application/json", @@ -33,11 +32,7 @@ def make_response_dict(request,d={}): return d def json_response(data): - json_serializer = serializers.get_serializer("json")() - json_serializer.serialize() - json_serializer.serialize(data) - - r = HttpResponse(data.getvalue(),content_type='application/json') + r = HttpResponse(simplejson.dumps(data),content_type='application/json') r['Cache-Control'] = 'no-cache, must-revalidate' r['Pragma'] = 'no-cache' |