From 01acbb53c6b36a0b1b7192b22f741bb9efbdad68 Mon Sep 17 00:00:00 2001 From: sinwoobang Date: Mon, 25 May 2015 19:45:28 +0900 Subject: [PATCH] Add a method to register multiple blueprints. --- flask/app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flask/app.py b/flask/app.py index 293eb6e9..a50c61db 100644 --- a/flask/app.py +++ b/flask/app.py @@ -931,6 +931,10 @@ class Flask(_PackageBoundObject): first_registration = True blueprint.register(self, options, first_registration) + def register_blueprints(self, blueprints): + for blueprint in blueprints: + self.register_blueprint(blueprint) + def iter_blueprints(self): """Iterates over all blueprints by the order they were registered.