From e404521e11def5fdc23b7c6927c936cc9331e90d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 11 Jan 2011 18:44:35 +0530 Subject: [PATCH] do NOT use one dict for all requests --- ox/django/shortcuts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ox/django/shortcuts.py b/ox/django/shortcuts.py index 57a314d..eda3277 100644 --- a/ox/django/shortcuts.py +++ b/ox/django/shortcuts.py @@ -11,7 +11,9 @@ class HttpErrorJson(Http404): def __init__(self, response): self.response = response -def json_response(data={}, status=200, text='ok'): +def json_response(data=None, status=200, text='ok'): + if not data: + data = {} return {'status': {'code': status, 'text': text}, 'data': data} def render_to_json_response(dictionary, content_type="text/json", status=200):