Class: Choice
Field for choosing an item from a set of options.
Please note that options must be specified as strings. Most often, however, choices are to be made from among sets of objects of a particular class as loaded from the database. As such, it is recommended that such selectors be implemented as a subclass, where a one-to-one mapping between the primary keys of the collection's objects and a string representation thereof can be established, and enforced by wrapping translate().
Methods
has_value (self, input)
Return whether a value has been provided for the field in the given MultiDict of input.
required (self)
Return whether the field is mandatory.
translate (self, input)
Translate the field from a MultiDict of values.
Attributes
Value of
None