Ejemplo n.º 1
0
def change_center(request):
    attr = request.POST.get('type', '')
    if attr == 'report':
        Server.change_report()
        return JsonResponse({'code':0})
    elif attr == 'mode':
        Server.change_mode()
        return JsonResponse({'code':0})
    else:
        print 'ERROR PARAM:', attr