Closed tonyseek closed 7 years ago
+1 for this. Would be very helpful for extensions. @tonyseek is there a pull request incoming?
Is #695 sufficient?
Not sure how that is useful? Wouldn't that run into bootstrapping issues as blueprints can only be registered as the application is instanciated? In that case I would assume the better approach is to just subclass Flask
and customize the register method?
Can anybody post some concrete examples where this hook might be useful, so @mitsuhiko is convinced?
I would like to decorate all of a blueprint's view functions with a custom @as_json function before registering the blueprint, without having to write @as_json on each one individually.
I was hoping to get a callback during blueprint-registration time to make these changes. Is there a better way?
I would like to add db related initialization (creating indexes) in the blueprint registration callback
Should it send a signal while
register_blueprint
been calling? Sometime we may expect to initialize something while a new blueprint been loading.