12 lines
346 B
Python
12 lines
346 B
Python
from flask import Blueprint
|
|
import os
|
|
import importlib
|
|
|
|
main = Blueprint('main', __name__)
|
|
|
|
|
|
controllers_dir = os.path.dirname(__file__)
|
|
for filename in os.listdir(controllers_dir):
|
|
if filename.endswith('.py') and filename != '__init__.py':
|
|
module_name = f'app.controllers.{filename[:-3]}'
|
|
importlib.import_module(module_name) |