Closed storborg closed 9 years ago
The final release of WebHelpers2 changed the select() semantics for typical lists of (value, label). More info here: https://webhelpers2.readthedocs.org/en/latest/modules/html/tags.html#select-and-options-helpers
WebHelpers2
select()
(value, label)
Evaluate making a rewrite layer which catches this usage, raises a DeprecationWarning, and converts to the new format.
DeprecationWarning
Here's a quick example of how to convert the usage:
countries_by_code = [ ('us', 'United States'), ('ca', 'Canada'), ('se', 'Sweden'), ('tr', 'Turkey'), ] # before from webhelpers.html.tags import * select('country_code', 'ca', countries_by_code) # after from webhelpers2.html.tags import * select('country_code', 'ca', Options([Option(label, value) for value, label in countries_by_code]))
Done in 440a30895704663fe75d1bffbe8e10fbf12b2a8c
The final release of
WebHelpers2
changed theselect()
semantics for typical lists of(value, label)
. More info here: https://webhelpers2.readthedocs.org/en/latest/modules/html/tags.html#select-and-options-helpersEvaluate making a rewrite layer which catches this usage, raises a
DeprecationWarning
, and converts to the new format.Here's a quick example of how to convert the usage: