New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request to add a callback hook while registering blueprint. #691
Comments
+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 |
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.The text was updated successfully, but these errors were encountered: