fanstatic / js.deform

Fanstatic packaging of deform
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

Adding auto_need method for auto-including Form resources #3

Closed davidjb closed 11 years ago

davidjb commented 11 years ago

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.

davidjb commented 11 years ago

Directly related to #2