FormAlchemy / formalchemy

MIT License
81 stars 29 forks source link

fix for change in webhelpers2 (fixes #62) #63

Closed teoric closed 9 years ago

teoric commented 9 years ago

This fixes #62, admittedly with brute force.

As noted in issue 62, webhelpers2 does not permit options to be tuples anymore; from http://webhelpers2.readthedocs.org/en/latest/modules/html/tags.html : “[Late change in 2.0rc3] The options argument to select no longer accepts lists of lists, lists of tuples, or other complex data structures. You can no longer pass [(myvalue, mylabel)] or [(optgroup_label, options)]; these now raise TypeError. Instead you should explicitly build up an Options instance and pass it. This restriction was made for simplicity, reliability, and maintainability.”

lieryan commented 7 years ago

This PR breaks compatibility with webhelpers2<=2.0rc2. If you use this, you'll need to upgrade to webhelpers2>=2.0, otherwise all <select> boxes will be broken.