From b06e863f91015d384bc18aea3dd48188c9b8d18d Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Fri, 14 Oct 2022 11:28:53 +0200 Subject: [PATCH] Create biling Blueprint --- ereuse_devicehub/billing/__init__.py | 0 ereuse_devicehub/billing/views.py | 7 +++++++ examples/app.py | 2 ++ 3 files changed, 9 insertions(+) create mode 100644 ereuse_devicehub/billing/__init__.py create mode 100644 ereuse_devicehub/billing/views.py diff --git a/ereuse_devicehub/billing/__init__.py b/ereuse_devicehub/billing/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ereuse_devicehub/billing/views.py b/ereuse_devicehub/billing/views.py new file mode 100644 index 00000000..fd88ba83 --- /dev/null +++ b/ereuse_devicehub/billing/views.py @@ -0,0 +1,7 @@ +import logging + +from flask import Blueprint + +billing = Blueprint('billing', __name__, url_prefix='/billing') + +logger = logging.getLogger(__name__) diff --git a/examples/app.py b/examples/app.py index 623bfaef..5ef2b956 100644 --- a/examples/app.py +++ b/examples/app.py @@ -7,6 +7,7 @@ Use this as a starting point. from decouple import config from ereuse_devicehub.api.views import api +from ereuse_devicehub.billing.views import billing from ereuse_devicehub.config import DevicehubConfig from ereuse_devicehub.devicehub import Devicehub from ereuse_devicehub.inventory.views import devices @@ -43,6 +44,7 @@ app.register_blueprint(devices) app.register_blueprint(labels) app.register_blueprint(api) app.register_blueprint(workbench) +app.register_blueprint(billing) # configure & enable CSRF of Flask-WTF # NOTE: enable by blueprint to exclude API views