Exemplo n.º 1
0
def output_html(data, code, headers=None):
    if app.config["HTML_REPR_EXISTS"] and request.path == "/":
        res = app.send_static_file("html/index.html")
    else:
        res = make_response("This resource is not available as text/html", 406)
        res.headers.add("Link", '<>; rel="alternate"; type="application/json"')
    if request.path == "/":
        res.headers.add(
            "Link",
            '</>; rel="alternate"; type="text/turtle"; ' + 'title="VoID description of the PeriodO Period Gazetteer',
        )
    res.headers.extend(headers or {})
    return res
Exemplo n.º 2
0
def vocab():
    return app.send_static_file('vocab.ttl')
Exemplo n.º 3
0
 def static_proxy(path=None):
     return app.send_static_file('html' + request.path)