disko/js.deform — pull request #3 by davidjb (2012-10-23 23:37:23+00:00)
Title: Adding auto_need method for auto-including Form resources

For a given form instance, one can now run ``js.deform.auto_need(form)`` and have the Fanstatic resources automatically included.

This pull request includes doctests within the given test_deform.txt file -- these succeed when being run under pytest. That said, I've hesitated with regards to defining a test dependency for this package right now -- thoughts?

The additional definitions of the Deform bundled resources are too brittle for my liking - as they'll break when a version changes within Deform - so having a better solution here would be a definite plus.

The only additional thing on my mind is that this code ignores any particular version requirements that Deform suggests (eg everything defined in ``deform.widget.default_resources`` states no particular version requirements for all libraries at present (eg the 'None' values in the dicts), but this could change in the future.