- Nowy blueprint /edukacja z materiałami szkoleniowymi - Link "Edukacja" w menu (tylko dla zalogowanych) - Strona placeholder z listą przyszłych materiałów - Dostęp wymaga logowania (@login_required) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
62 lines
1.9 KiB
Python
62 lines
1.9 KiB
Python
"""
|
|
Blueprints Package
|
|
==================
|
|
|
|
Central registration of all Flask blueprints.
|
|
"""
|
|
|
|
import logging
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
def register_blueprints(app):
|
|
"""
|
|
Register all blueprints with the Flask application.
|
|
|
|
Args:
|
|
app: Flask application instance
|
|
"""
|
|
# Phase 1: Low-risk modules
|
|
|
|
# Reports blueprint
|
|
try:
|
|
from blueprints.reports import bp as reports_bp
|
|
app.register_blueprint(reports_bp)
|
|
logger.info("Registered blueprint: reports")
|
|
except ImportError as e:
|
|
logger.debug(f"Blueprint reports not yet available: {e}")
|
|
|
|
# Community blueprints - register directly (not nested)
|
|
# to preserve endpoint names like 'calendar_index' instead of 'community.calendar.calendar_index'
|
|
try:
|
|
from blueprints.community.contacts import bp as contacts_bp
|
|
app.register_blueprint(contacts_bp)
|
|
logger.info("Registered blueprint: contacts")
|
|
except ImportError as e:
|
|
logger.debug(f"Blueprint contacts not yet available: {e}")
|
|
|
|
try:
|
|
from blueprints.community.classifieds import bp as classifieds_bp
|
|
app.register_blueprint(classifieds_bp)
|
|
logger.info("Registered blueprint: classifieds")
|
|
except ImportError as e:
|
|
logger.debug(f"Blueprint classifieds not yet available: {e}")
|
|
|
|
try:
|
|
from blueprints.community.calendar import bp as calendar_bp
|
|
app.register_blueprint(calendar_bp)
|
|
logger.info("Registered blueprint: calendar")
|
|
except ImportError as e:
|
|
logger.debug(f"Blueprint calendar not yet available: {e}")
|
|
|
|
# Education blueprint
|
|
try:
|
|
from blueprints.education import bp as education_bp
|
|
app.register_blueprint(education_bp)
|
|
logger.info("Registered blueprint: education")
|
|
except ImportError as e:
|
|
logger.debug(f"Blueprint education not yet available: {e}")
|
|
|
|
# Phase 2-7: Future blueprints will be added here
|