Browse Source

Add a method to register multiple blueprints.

pull/1472/head
sinwoobang 10 years ago
parent
commit
01acbb53c6
  1. 4
      flask/app.py

4
flask/app.py

@ -931,6 +931,10 @@ class Flask(_PackageBoundObject):
first_registration = True first_registration = True
blueprint.register(self, options, first_registration) blueprint.register(self, options, first_registration)
def register_blueprints(self, blueprints):
for blueprint in blueprints:
self.register_blueprint(blueprint)
def iter_blueprints(self): def iter_blueprints(self):
"""Iterates over all blueprints by the order they were registered. """Iterates over all blueprints by the order they were registered.

Loading…
Cancel
Save