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

fix resource registry, again #67

Open
dholth opened this issue Feb 19, 2014 · 1 comment
Open

fix resource registry, again #67

dholth opened this issue Feb 19, 2014 · 1 comment

Comments

@dholth
Copy link
Contributor

dholth commented Feb 19, 2014

It looks like set_*_resources expects each resource as a new positional argument. To fix, change all the .resources.default_resources to sequences and use * as below.

http://deform.readthedocs.org/en/latest/api.html#deform.widget.ResourceRegistry.set_css_resources

deform_bootstrap.init:

def add_resources_to_registry():
"""
Register deform_bootstrap widget specific requirements to deform's
default resource registry
"""
registry = Form.default_resource_registry
for rqrt, versions in default_resources.items():
for version, resources in versions.items():
registry.set_js_resources(rqrt, version, *resources.get('js'))
registry.set_css_resources(rqrt, version, *resources.get('css'))

@dnouri
Copy link
Contributor

dnouri commented Feb 19, 2014

Hey Daniel. Would you kindly send a pull request, it's not entirely clear to me what the changes need to look like. Also, can you specify which version of deform we're targeting with this change. Thanks.

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

2 participants