예제 #1
0
def emitResponse(contextDict, content, isHtmlView):
    if isHtmlView:
        result = HttpResponseRedirect(content)
    else:
        result = HttpResponse(
            XmlEmitter.emitXmlContent(contextDict['operation'], True, content,
                                      None))
    return result
예제 #2
0
def emitErrorResponse(contextDict, message, isHtmlView):
    if isHtmlView:
        result = HttpResponse('<h4>%s</hr><p>%s' % ('Error', message))
    else:
        result = HttpResponse(
            XmlEmitter.emitXmlContent(contextDict['operation'], False, None,
                                      message))
    return result
예제 #3
0
def emitResponse(contextDict, content, isHtmlView):
    if isHtmlView:
        result = HttpResponseRedirect(content)
    else:
        result = HttpResponse(XmlEmitter.emitXmlContent(contextDict['operation'], True, content, None))
    return result
예제 #4
0
def emitErrorResponse(contextDict, message, isHtmlView):
    if isHtmlView:
        result = HttpResponse('<h4>%s</hr><p>%s' % ('Error', message))
    else:
        result = HttpResponse(XmlEmitter.emitXmlContent(contextDict['operation'], False, None, message))
    return result