Project

General

Profile

« Previous | Next » 

Revision b9613248

Added by Benjamin Dauvergne almost 11 years ago

use plain json serialization format so that Django can log exceptions

View differences:

wcsinst/wcsinstd/views.py
1 1
import json
2
import threading
2
import logging
3 3

  
4 4
from django.views.decorators.csrf import csrf_exempt
5 5
from django.views.decorators.http import require_POST
......
8 8

  
9 9
from .deploy import DeployInstance
10 10

  
11
logger = logging.getLogger(__name__)
11 12

  
12 13
@csrf_exempt
13
@to_json('api')
14
@to_json('plain')
14 15
@require_POST
15 16
def create(request):
16 17
    data = json.loads(request.body)
......
20 21

  
21 22

  
22 23
@csrf_exempt
23
@to_json('api')
24
@to_json('plain')
24 25
@require_POST
25 26
def update(request, instance):
26 27
    print 'updating instance:', instance

Also available in: Unified diff