From da73052c84d5566bf3d221d90f93688db125181d Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 26 Nov 2020 18:13:00 +0300 Subject: add facilities page --- wqflask/wqflask/markdown_routes.py | 10 ++++++++-- wqflask/wqflask/templates/facilities.html | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 wqflask/wqflask/templates/facilities.html diff --git a/wqflask/wqflask/markdown_routes.py b/wqflask/wqflask/markdown_routes.py index 073370c7..7765af36 100644 --- a/wqflask/wqflask/markdown_routes.py +++ b/wqflask/wqflask/markdown_routes.py @@ -13,6 +13,7 @@ references_blueprint = Blueprint("references_blueprint", __name__) environments_blueprint = Blueprint("environments_blueprint", __name__) links_blueprint = Blueprint("links_blueprint", __name__) policies_blueprint = Blueprint("policies_blueprint", __name__) +facilities_blueprint=Blueprint("facilities",__name__) #for debug github_url = ("https://raw.githubusercontent.com/" @@ -36,8 +37,8 @@ def render_markdown_table(file_name,github_url="https://raw.githubusercontent.co def render_markdown(file_name,github_url="https://raw.githubusercontent.com/Alexanderlacuna/gn-docs/feature/add-markdown-pages/"): - github_url = ("https://raw.githubusercontent.com/" - "genenetwork/gn-docs/master/") + # github_url = ("https://raw.githubusercontent.com/" + # "genenetwork/gn-docs/master/") md_content=requests.get(f"{github_url}{file_name}") """Try to fetch the file name from Github and if that fails, try to @@ -92,3 +93,8 @@ def policies(): return render_template( "links.html", rendered_markdown=render_markdown("general/policies/policies.md")), 200 + + +@facilities_blueprint.route("/") +def facilities(): + return render_template("facilities",rendered_markdown=render_markdown("general/policies/policies.md")), 200 \ No newline at end of file diff --git a/wqflask/wqflask/templates/facilities.html b/wqflask/wqflask/templates/facilities.html new file mode 100644 index 00000000..5be0c96d --- /dev/null +++ b/wqflask/wqflask/templates/facilities.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% block title %}Facilities{% endblock %} + +{% block css %} + +{% endblock %} + +{% block content %} + +
+ Edit on Github +
+ +
+ {{ rendered_markdown|safe }} + +
+ + +{% endblock %} \ No newline at end of file -- cgit v1.2.3