aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2020-11-03 17:29:04 +0300
committerBonfaceKilz2020-11-03 17:29:30 +0300
commit52b2b9b8a68572207d9165e57b50fd90c63b1d1e (patch)
tree13fe87649af68dbeb164bafecce6c18353e0dd55
parentd6c18c29ed9ccfadc1798c8a7c460faa428d1d5b (diff)
downloadgenenetwork2-52b2b9b8a68572207d9165e57b50fd90c63b1d1e.tar.gz
Add and register glossary blueprint
-rw-r--r--wqflask/wqflask/__init__.py3
-rw-r--r--wqflask/wqflask/glossary.py9
2 files changed, 12 insertions, 0 deletions
diff --git a/wqflask/wqflask/__init__.py b/wqflask/wqflask/__init__.py
index eeece241..a3870ce6 100644
--- a/wqflask/wqflask/__init__.py
+++ b/wqflask/wqflask/__init__.py
@@ -6,6 +6,7 @@ import jinja2
from flask import g
from flask import Flask
from utility import formatting
+from wqflask.glossary import glossary_blueprint
app = Flask(__name__)
@@ -16,6 +17,8 @@ app.jinja_env.globals.update(
undefined=jinja2.StrictUndefined,
numify=formatting.numify)
+# Registering blueprints
+app.register_blueprint(glossary_blueprint, url_prefix="/glossary")
@app.before_request
def before_request():
diff --git a/wqflask/wqflask/glossary.py b/wqflask/wqflask/glossary.py
new file mode 100644
index 00000000..0918744a
--- /dev/null
+++ b/wqflask/wqflask/glossary.py
@@ -0,0 +1,9 @@
+from flask import Blueprint
+
+
+glossary_blueprint = Blueprint('glossary_blueprint', __name__)
+
+
+@glossary_blueprint.route('/')
+def glossary():
+ return "This is a test", 200