summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2013-11-21 15:53:46 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2013-11-21 15:53:55 (GMT)
commitb9613248740000f8219389c3037334552b591aae (patch)
tree7dd0b861126fbf822a79937fcd2658be3bc4b92f
parent0cd7df4bbfdefc504efe7b452549ce93b943d446 (diff)
downloadwcsinst-b9613248740000f8219389c3037334552b591aae.zip
wcsinst-b9613248740000f8219389c3037334552b591aae.tar.gz
wcsinst-b9613248740000f8219389c3037334552b591aae.tar.bz2
use plain json serialization format so that Django can log exceptions
-rw-r--r--wcsinst/wcsinstd/views.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/wcsinst/wcsinstd/views.py b/wcsinst/wcsinstd/views.py
index 52ddb48..a89667c 100644
--- a/wcsinst/wcsinstd/views.py
+++ b/wcsinst/wcsinstd/views.py
@@ -1,5 +1,5 @@
import json
-import threading
+import logging
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_POST
@@ -8,9 +8,10 @@ from jsonresponse import to_json
from .deploy import DeployInstance
+logger = logging.getLogger(__name__)
@csrf_exempt
-@to_json('api')
+@to_json('plain')
@require_POST
def create(request):
data = json.loads(request.body)
@@ -20,7 +21,7 @@ def create(request):
@csrf_exempt
-@to_json('api')
+@to_json('plain')
@require_POST
def update(request, instance):
print 'updating instance:', instance