X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/30867afe6b13d2a6a85d47b23f22f12e0d4c388b..3b7f8a9926c3de750443801404309a2aa8659d14:/apps/wiki/helpers.py diff --git a/apps/wiki/helpers.py b/apps/wiki/helpers.py index dace3d00..8983e401 100644 --- a/apps/wiki/helpers.py +++ b/apps/wiki/helpers.py @@ -1,8 +1,9 @@ +# -*- coding: utf-8 -*- from datetime import datetime from functools import wraps from django import http -from django.utils import simplejson as json +import json from django.utils.functional import Promise @@ -21,7 +22,9 @@ class ExtendedEncoder(json.JSONEncoder): # shortcut for JSON reponses class JSONResponse(http.HttpResponse): - def __init__(self, data={}, **kwargs): + def __init__(self, data=None, **kwargs): + if data is None: + data = {} # get rid of mimetype kwargs.pop('mimetype', None)