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
def vocab(): return app.send_static_file('vocab.ttl')
def static_proxy(path=None): return app.send_static_file('html' + request.path)