This commit is contained in:
2025-08-13 09:45:38 -07:00
13 changed files with 1226 additions and 2 deletions

View File

@@ -25,6 +25,13 @@ login_manager.login_message = 'Please log in to access this page.'
login_manager.login_message_category = 'warning'
# Import scheduler (import here to avoid circular imports)
try:
from app.scheduler import Scheduler
except ImportError:
Scheduler = None
def create_app(config_name='default'):
app = Flask(__name__, static_folder='static', static_url_path='/static')
app.config.from_object(config[config_name])
@@ -43,6 +50,11 @@ def create_app(config_name='default'):
migrate = Migrate(app, db)
login_manager.init_app(app)
# Initialize and register scheduler if available
if Scheduler:
scheduler = Scheduler(app)
app.scheduler = scheduler
# Register blueprints
from app.routes import main
from app.auth import auth