Skip to content

fix resource registry, again #67

@dholth

Description

@dholth

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'))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions