fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bugfix
[redakcja.git]
/
apps
/
wiki
/
helpers.py
diff --git
a/apps/wiki/helpers.py
b/apps/wiki/helpers.py
index
553b1e4
..
dace3d0
100644
(file)
--- a/
apps/wiki/helpers.py
+++ b/
apps/wiki/helpers.py
@@
-1,8
+1,9
@@
+from datetime import datetime
+from functools import wraps
+
from django import http
from django.utils import simplejson as json
from django.utils.functional import Promise
from django import http
from django.utils import simplejson as json
from django.utils.functional import Promise
-from datetime import datetime
-from functools import wraps
class ExtendedEncoder(json.JSONEncoder):
class ExtendedEncoder(json.JSONEncoder):
@@
-24,9
+25,8
@@
class JSONResponse(http.HttpResponse):
# get rid of mimetype
kwargs.pop('mimetype', None)
# get rid of mimetype
kwargs.pop('mimetype', None)
- super(JSONResponse, self).__init__(
- json.dumps(data, cls=ExtendedEncoder),
- mimetype="application/json", **kwargs)
+ data = json.dumps(data, cls=ExtendedEncoder)
+ super(JSONResponse, self).__init__(data, mimetype="application/json", **kwargs)
# return errors
# return errors