alecthomas/flask_injector — pull request #2 by jstasiak (2012-12-14 23:12:22+00:00)
Title: Make FlaskInjector able to modify preexisting views in legacy apps

Motivation behind this changed is that if you already have pretty large Flask application it's tedious to change all ``@app.route``s (or ``@some_blueprint.route``) to FlaskInjector's ``route``. What's more, I couldn't figure out how to make it work with Flask Blueprints.

So instead I just quickly wrote these few lines of code which execute when you **don't** pass any views to ``FlaskInjector`` constructor and override existing views.

Not sure if ``init_app`` is the right place to do that though.