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

Support all settings #1

Closed
miracle2k opened this issue Jan 9, 2012 · 2 comments
Closed

Support all settings #1

miracle2k opened this issue Jan 9, 2012 · 2 comments

Comments

@miracle2k
Copy link

Thanks for writing this! I love seeing wider framework support for webassets.

One thing I noticed: It seems like you currently are only supporting a select number of settings, which would mean that other filter's settings (SASS_BIN etc). would not be supported. There is actually a way to support settings in a generic manner: You can create the webassets Environment with a custom config_storage_class attribute. It's a relatively simple class that would wrap the Pyramid settings object.

If you look at how the Django wrapper does this:

https://github.com/miracle2k/flask-assets/blob/master/src/flaskext/assets.py

It goes through the extra effort of only using a prefix for the core settings, but not for any that filters might use, i.e. within Django, it would be ASSETS_UPDATER, but SASS_BIN, but that might or might not be appropriate for Pyramid.

By wrapping the settings in a generic fashion, you also gain better upwards-compatibility. For example, the "updater" setting will likely be replaced with one called "auto_build" in the future.

@tilgovi
Copy link
Collaborator

tilgovi commented Apr 26, 2012

Here, here. There's a pull request open for this already. Any interest in merging? I'm happy to clean it up or try the config_storage_class approach if the original author is anything but responsive.

@tilgovi
Copy link
Collaborator

tilgovi commented Jun 15, 2012

The pull request is merged. This can be closed.

@sontek sontek closed this as completed Jun 20, 2012
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

No branches or pull requests

3 participants