From bf0d6da143b557aff09964b6fdd4a5af32dfc533 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 1 Jun 2019 23:52:19 +0200 Subject: [PATCH] Move blueprints into components --- .../web/blueprints/{helloworld.py => helloworld/__init__.py} | 3 +-- royalnet/web/blueprints/{testing.py => testing/__init__.py} | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) rename royalnet/web/blueprints/{helloworld.py => helloworld/__init__.py} (84%) rename royalnet/web/blueprints/{testing.py => testing/__init__.py} (84%) diff --git a/royalnet/web/blueprints/helloworld.py b/royalnet/web/blueprints/helloworld/__init__.py similarity index 84% rename from royalnet/web/blueprints/helloworld.py rename to royalnet/web/blueprints/helloworld/__init__.py index cd8e77aa..ada6eed5 100644 --- a/royalnet/web/blueprints/helloworld.py +++ b/royalnet/web/blueprints/helloworld/__init__.py @@ -1,5 +1,5 @@ import flask as f -from .. import Royalprint +from ... import Royalprint bp = Royalprint("helloworld", __name__, url_prefix="/helloworld") @@ -8,4 +8,3 @@ bp = Royalprint("helloworld", __name__, url_prefix="/helloworld") @bp.route("/") def helloworld(): return "Hello world!" - diff --git a/royalnet/web/blueprints/testing.py b/royalnet/web/blueprints/testing/__init__.py similarity index 84% rename from royalnet/web/blueprints/testing.py rename to royalnet/web/blueprints/testing/__init__.py index 989b95af..abd645e2 100644 --- a/royalnet/web/blueprints/testing.py +++ b/royalnet/web/blueprints/testing/__init__.py @@ -1,6 +1,6 @@ import flask as f -from .. import Royalprint -from ...database.tables import Royal +from ... import Royalprint +from ....database.tables import Royal bp = Royalprint("testing", __name__, url_prefix="/testing", required_tables={Royal})