Пример #1
0
def add_function(request):
    name = request.POST.get('name', None)
    if name:
        toolbar.add_function(name)
    call_command('flush', interactive=False)
    call_command('loaddata', *toolbar.fixtures)    
    return HttpResponse('{}')
Пример #2
0
def add_function(request):
    name = request.POST.get('name', None)
    if name:
        toolbar.add_function(name)
    call_command('flush', interactive=False)
    call_command('loaddata', *toolbar.fixtures)
    return HttpResponse('{}')
Пример #3
0
def init(request):
    class_name = request.POST.get('class_name', None)
    func_name = request.POST.get('func_name', None)
    if class_name:
        toolbar.class_name = class_name
    if func_name:
        toolbar.add_function(func_name)
    toolbar.init = False
    toolbar.start_record = True            
    return HttpResponse('{}')
Пример #4
0
def init(request):
    class_name = request.POST.get('class_name', None)
    func_name = request.POST.get('func_name', None)
    if class_name:
        toolbar.class_name = class_name
    if func_name:
        toolbar.add_function(func_name)
    toolbar.init = False
    toolbar.start_record = True
    return HttpResponse('{}')