Created
September 5, 2018 20:37
-
-
Save doobeh/f09a01d56619009ef3e2fb92427c46e7 to your computer and use it in GitHub Desktop.
register_blueprints
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def register_blueprints(app): | |
"""Register all blueprint modules | |
Reference: Armin Ronacher, "Flask for Fun and for Profit" PyBay 2016. | |
""" | |
for name in find_modules("gtcloud.blueprints"): | |
mod = import_string(name) | |
if hasattr(mod, "bp"): | |
app.register_blueprint(mod.bp) | |
return None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment