def single_page(page_name): try: document = Document.load(page_name) except FileNotFoundError: raise NotFound("The requested page '{}' is not found".format(page_name)) return render_template("single.html", **document.dump())
def discontinued(): context = {"documents": Document.load_all(DocumentStatus.discontinued)} context.update(Document.manifest()["discontinued"]) return render_template("projects.html", **context)
def current(): context = {"documents": Document.load_all(DocumentStatus.current)} context.update(Document.manifest()["current"]) return render_template("projects.html", **context)