Skip to content

Commit

Permalink
reading asset module names from config
Browse files Browse the repository at this point in the history
  • Loading branch information
Bibhas committed Nov 13, 2019
1 parent 09eb848 commit 299bc97
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions baseframe/__init__.py
Expand Up @@ -248,11 +248,12 @@ def init_app(
app.assets.register('css_all', css_all)
app.register_blueprint(self, static_subdomain=subdomain)

try:
module = __import__('baseframe-assets')
app.register_blueprint(module.blueprint)
except ImportError:
pass
for module_name in app.config.get('PRIVATE_ASSETS', []):
try:
module = __import__(module_name)
app.register_blueprint(module.blueprint)
except ImportError:
continue

# Optional config for a client app to use a manifest file
# to load fingerprinted assets
Expand Down

0 comments on commit 299bc97

Please sign in to comment.