Example #1
0
def diff():
    if not request.query.fromDTS or not request.query.toDTS or not request.query.report:
        return _("From DTS, to DTS, and report must be specified")
    options = Options()
    setattr(options, "entrypointFile", request.query.fromDTS)
    setattr(options, "diffFile", request.query.toDTS)
    fh = FileNamedStringIO(request.query.report)
    setattr(options, "versReportFile", fh)
    cntlr.run(options)
    reportContents = fh.getvalue()
    fh.close()
    response.content_type = 'text/xml; charset=UTF-8'
    return reportContents
Example #2
0
def diff():
    """Execute versioning diff request for *get* request to */rest/xbrl/diff*.
    
    :returns: xml -- Versioning report.
    """
    if not request.query.fromDTS or not request.query.toDTS or not request.query.report:
        return _("From DTS, to DTS, and report must be specified")
    options = Options()
    setattr(options, "entrypointFile", request.query.fromDTS)
    setattr(options, "diffFile", request.query.toDTS)
    fh = FileNamedStringIO(request.query.report)
    setattr(options, "versReportFile", fh)
    cntlr.run(options)
    reportContents = fh.getvalue()
    fh.close()
    response.content_type = 'text/xml; charset=UTF-8'
    return reportContents
Example #3
0
def diff():
    """Execute versioning diff request for *get* request to */rest/xbrl/diff*.
    
    :returns: xml -- Versioning report.
    """
    if not request.query.fromDTS or not request.query.toDTS or not request.query.report:
        return _("From DTS, to DTS, and report must be specified")
    options = Options()
    setattr(options, "entrypointFile", request.query.fromDTS)
    setattr(options, "diffFile", request.query.toDTS)
    fh = FileNamedStringIO(request.query.report)
    setattr(options, "versReportFile", fh)
    cntlr.run(options)
    reportContents = fh.getvalue()
    fh.close()
    response.content_type = 'text/xml; charset=UTF-8'
    return reportContents