diff --git a/src/flask/app.py b/src/flask/app.py index 7fc79546..496732ec 100644 --- a/src/flask/app.py +++ b/src/flask/app.py @@ -430,13 +430,13 @@ class Flask(Scaffold): #: .. versionadded:: 0.11 self.shell_context_processors = [] - #: all the attached blueprints in a dictionary by name. Blueprints - #: can be attached multiple times so this dictionary does not tell - #: you how often they got attached. + #: Maps registered blueprint names to blueprint objects. The + #: dict retains the order the blueprints were registered in. + #: Blueprints can be registered multiple times, this dict does + #: not track how often they were attached. #: #: .. versionadded:: 0.7 self.blueprints = {} - self._blueprint_order = [] #: a place where extensions can store application specific state. For #: example this is where an extension could store database engines and @@ -997,7 +997,6 @@ class Flask(Scaffold): ) else: self.blueprints[blueprint.name] = blueprint - self._blueprint_order.append(blueprint) first_registration = True blueprint.register(self, options, first_registration) @@ -1007,7 +1006,7 @@ class Flask(Scaffold): .. versionadded:: 0.11 """ - return iter(self._blueprint_order) + return self.blueprints.values() @setupmethod def add_url_rule(