Exemple #1
0
def create_block_signature_from_resource(view_type, resource):
    
    handler = load_block_handler(view_type)
    
    response = handler.create_block_signature_from_resource(resource)
    
    return response    
Exemple #2
0
def create_block_signature_from_resource(view_type, resource):

    handler = load_block_handler(view_type)

    response = handler.create_block_signature_from_resource(resource)

    return response
Exemple #3
0
def view_factory(request, resource_type, resource_id, view_type, args=""):

    response = ""

    #log.debug("view_factory:type = ",view_type);
    handler = load_block_handler(view_type)

    if (args != "options"):
        if settings.PROFILING:
            get_response = profile(view_type)(handler.get_response)
            response = get_response(handler, request, resource_type,
                                    resource_id, args)
        else:
            response = handler.get_response(request, resource_type,
                                            resource_id, args)

    else:
        if (request.method == "GET"):
            response = handler.options_response(request, resource_type,
                                                resource_id)
        else:
            response = handler.options_response(request, resource_type,
                                                resource_id)

    return response
Exemple #4
0
def view_factory(request, resource_type, resource_id, view_type, args=""):
    
    response = ""
    
    #log.debug("view_factory:type = ",view_type);
    handler = load_block_handler(view_type)
    
    if (args != "options"):
        if settings.PROFILING:
            get_response = profile(view_type)(handler.get_response)
            response = get_response(handler,request, resource_type, resource_id, args)
        else:
            response = handler.get_response(request, resource_type, resource_id, args)
 
    else: 
        if (request.method == "GET"):
            response = handler.options_response(request, resource_type, resource_id)
        else:
            response = handler.options_response(request, resource_type, resource_id)

    return response