diff options
-rw-r--r-- | wqflask/wqflask/__init__.py | 3 | ||||
-rw-r--r-- | wqflask/wqflask/glossary.py | 9 |
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 |