Skip to content
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

added blueprint to baseframe-assets #246

Merged
merged 6 commits into from Nov 28, 2019
Merged

added blueprint to baseframe-assets #246

merged 6 commits into from Nov 28, 2019

Conversation

iambibhas
Copy link
Contributor

No description provided.

@iambibhas iambibhas requested a review from jace November 13, 2019 05:22
@@ -248,6 +248,12 @@ def init_app(
app.assets.register('css_all', css_all)
app.register_blueprint(self, static_subdomain=subdomain)

try:
module = __import__('baseframe-assets')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asset name should be a parameter to the function here. There's no need for __import__ otherwise.

@jace
Copy link
Member

jace commented Nov 13, 2019

Original ticket: #165.

@@ -248,6 +248,14 @@ def init_app(
app.assets.register('css_all', css_all)
app.register_blueprint(self, static_subdomain=subdomain)

for module_name in app.config.get('PRIVATE_ASSETS', []):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use config as it's a statutory requirement for the client app and not a configuration issue. Take it as a parameter named asset_modules instead.

module.blueprint.init_app_assets(app, assets)
app.register_blueprint(module.blueprint)
except ImportError:
continue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log an error here (app logger or Blueprint logger).

Copy link
Member

@jace jace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small issues. Can be merged after.

baseframe/__init__.py Outdated Show resolved Hide resolved
baseframe/__init__.py Outdated Show resolved Hide resolved
baseframe/__init__.py Outdated Show resolved Hide resolved
@iambibhas iambibhas merged commit 5bb4e81 into master Nov 28, 2019
@iambibhas iambibhas deleted the baseframe-assets branch November 28, 2019 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants