-
-
Notifications
You must be signed in to change notification settings - Fork 16.8k
Support zero-ceremony sub-app mounting (including Blueprints) #1548
Copy link
Copy link
Closed
Labels
Milestone
Description
#1361, #1498, and #1494 seem to indicate that some people don't see Blueprints as templates for application behavior, but want to treat them as little self-contained applications that are composed onto the main application. Effectively, we would be taking the app composition pattern and building it into the API.
What sort of an API would we need to properly support app composition for such purposes, since that would solve all of these use cases (404 / 405 error handlers at the "Blueprint" level, only able to see its own templates, etc.)?
The minimum API is Flask#mount_app(app_or_blueprint) - but that still leaves a few questions:
- Does the parent app need to be able to route to sub-app routes via
url_for? - Does the child app need to be able to route to parent or sibling-app routes via
url_for? - Ditto for
staticandtemplates(although Methodrender_templatedoes not use blueprint specifiedtemplate_folder#1361 suggests that such uses would want the static and template folders to be distinct). - Other questions which I am certainly missing
What do you need from Blueprints? What else would you expect Flask#mout_app to do?
Reactions are currently unavailable