mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-14 11:33:51 +01:00
11 lines
304 B
Python
11 lines
304 B
Python
|
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)
|