示例#1
0
def _render(response, path, state, **extra):
    state.update(extra)
    if 'dispatch_result' not in state:
        state['dispatch_result'] = DispatchResult(DispatchStatus.okay, path,
                                                  {}, "Response.render()", {},
                                                  False)
    request_processor = state['request_processor']
    output = aspen.resources.get(request_processor, path).render(state)
    fill_response_with_output(output, response, request_processor)
    raise response
示例#2
0
def _render(response, path, state, **extra):
    state.update(extra)
    if 'dispatch_result' not in state:
        state['dispatch_result'] = DispatchResult(
            DispatchStatus.okay, path, {}, "Response.render()", {}, False
        )
    request_processor = state['request_processor']
    output = aspen.resources.get(request_processor, path).render(state)
    fill_response_with_output(output, response, request_processor)
    raise response
示例#3
0
def _render(response, path, state, **extra):
    state.update(extra)
    request_processor = state['request_processor']
    output = aspen.resources.get(request_processor, path).render(state)
    fill_response_with_output(output, response, request_processor)
    raise response