Ejemplo n.º 1
0
def app_model(request, model):
    # Processes & returns model-based requests
    return json_response(process(request, model, id=None), get_user(request))
Ejemplo n.º 2
0
def app_instance(request, model, id):
    # Process & returns instance-based requests
    return json_response(process(request, model, int(id)), get_user(request))
Ejemplo n.º 3
0
def account(request):
    # Processes & returns account-based requests
    user = get_user(request)
    return json_response(process(request, Practice, id=user.practice.pk), user)