fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update editor
[redakcja.git]
/
apps
/
wiki
/
helpers.py
diff --git
a/apps/wiki/helpers.py
b/apps/wiki/helpers.py
index
bc4b760
..
8983e40
100644
(file)
--- a/
apps/wiki/helpers.py
+++ b/
apps/wiki/helpers.py
@@
-1,9
+1,11
@@
-from django import http
-from django.utils import simplejson as json
-from django.utils.functional import Promise
+# -*- coding: utf-8 -*-
from datetime import datetime
from functools import wraps
from datetime import datetime
from functools import wraps
+from django import http
+import json
+from django.utils.functional import Promise
+
class ExtendedEncoder(json.JSONEncoder):
class ExtendedEncoder(json.JSONEncoder):
@@
-20,7
+22,9
@@
class ExtendedEncoder(json.JSONEncoder):
# shortcut for JSON reponses
class JSONResponse(http.HttpResponse):
# 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)
# get rid of mimetype
kwargs.pop('mimetype', None)