def add_blueprints(app): blueprints, compat_blueprints = discover_blueprints() for blueprint in blueprints: app.register_blueprint(blueprint) if app.config['INDICO_COMPAT_ROUTES']: compat_blueprints |= {make_compat_blueprint(bp) for bp in blueprints if bp.name in AUTO_COMPAT_BLUEPRINTS} for blueprint in compat_blueprints: app.register_blueprint(blueprint)