Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork16.7k
Conversation
Abdur-rahmaanJ commentedFeb 25, 2021
Building theShopyo framework which makes use of this idea (not for nested but normal blueprints), i posed the question of infinity. It is better expressed inThiefMaster's words: "Wouldn't a proper implementation of "sub-blueprints" pretty much automatically support infinite nesting of blueprints, too, anyway?" How does this PR address the issue? |
pgjones commentedFeb 25, 2021
@Abdur-rahmaanJ This supports infinite nesting, subject to resource limitations, so I don't think there is an issue. |
2684eea to7c60412Comparepgjones commentedApr 7, 2021
I'm not sure if any additional documentation is required, as the nesting should work as a user would expect - therefore I think it is best just to note that nesting is possible. |
68125b8 to8e21346CompareThis allows blueprints to be nested within blueprints via a newBlueprint.register_blueprint method. This should provide a use casethat has been desired for the past ~10 years.This works by setting the endpoint name to be the blueprint names,from parent to child delimeted by "." and then iterating over theblueprint names in reverse order in the app (from most specific tomost general). This means that the expectation of nesting a blueprintwithin a nested blueprint is met.
davidism commentedApr 14, 2021
I added a few more lines of documentation mentioning that URL prefixes are applied like |
pgjones commentedApr 14, 2021
🎉 |
jackwardell commentedApr 14, 2021
so exciting, great work 👏 |
hXtreme commentedApr 14, 2021
This is the day I've been waiting for!🎉 |
Uh oh!
There was an error while loading.Please reload this page.
This allows blueprints to be nested within blueprints via a new
Blueprint.register_blueprint method. This should provide a use case
that has been desired for the past ~10 years.
This works by setting the endpoint name to be the blueprint names,
from parent to child delimeted by "." and then iterating over the
blueprint names in reverse order in the app (from most specific to
most general). This means that the expectation of nesting a blueprint
within a nested blueprint is met.
Checklist:
CHANGES.rstsummarizing the change and linking to the issue... versionchanged::entries in any relevant code docs.pre-commithooks and fix any issues.pytestandtox, no tests failed.