blob: 74aa9ae3d5f14c7dc08ca450e513e8d17d45d35b (
plain)
1
2
3
4
5
6
7
8
9
10
|
import os, importlib
def create_blueprints(app):
dir = os.path.dirname(os.path.realpath(__file__))
modules = next(os.walk(dir))[1]
for modname in modules:
if all(c.islower() for c in modname):
module = importlib.import_module("." + modname, __name__)
app.register_blueprint(module.bp)
|