# myapp/projects/__init__.py from flask import Blueprint # Define the Blueprint instance for the projects module. # 'projects' is the unique name for this blueprint. # url_prefix='/api/projects' will be prepended to all routes defined in this blueprint. bp = Blueprint('projects', __name__, url_prefix='/api/projects') # Import the routes module. # This connects the routes defined in routes.py to the 'bp' instance. # This import MUST come AFTER the Blueprint 'bp' is defined. from . import projects_routes