Compare commits

...

2 Commits

Author SHA1 Message Date
j 377386df46 use application/json 2019-11-18 23:49:07 +01:00
j b0463ae6d7 fix local urls 2019-11-18 17:25:35 +01:00
2 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,7 @@ def _to_json(python_object):
return python_object.strftime('%Y-%m-%dT%H:%M:%SZ')
raise TypeError('%s %s is not JSON serializable' % (repr(python_object), type(python_object)))
def render_to_json_response(dictionary, content_type="text/json", status=200):
def render_to_json_response(dictionary, content_type="application/json", status=200):
indent = None
if settings.DEBUG:
content_type = "text/javascript"

View File

@ -48,7 +48,8 @@ if settings.DEBUG:
#load local urls if present
try:
from local_urls import urlpatterns
from local_urls import urlpatterns as local_patterns
urlpatterns += local_patterns
except ImportError:
pass