def emitResponse(contextDict, content, isHtmlView): if isHtmlView: result = HttpResponseRedirect(content) else: result = HttpResponse( XmlEmitter.emitXmlContent(contextDict['operation'], True, content, None)) return result
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
def emitResponse(contextDict, content, isHtmlView): if isHtmlView: result = HttpResponseRedirect(content) else: result = HttpResponse(XmlEmitter.emitXmlContent(contextDict['operation'], True, content, None)) return result
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