Kotti / deform_bootstrap

Bootstrap compatible templates for the deform form library. (Merged into deform 2.)
http://pypi.python.org/pypi/deform_bootstrap
34 stars 30 forks source link

fix resource registry, again #67

Open dholth opened 10 years ago

dholth commented 10 years ago

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 commented 10 years ago

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.