A ChoiceField allows choosing one of several values.
The set of acceptable values can be determined when the field is
created or dynamically. The empty string is used as the "no
choice" value, and cannot therefore be one of the permitted
values.
Methods
|
|
FormatValueAsHtml
GetItems
Validate
|
|
FormatValueAsHtml
|
FormatValueAsHtml (
self,
server,
value,
style,
name=None,
)
|
|
GetItems
|
GetItems ( self )
Return the options from which to choose.
- returns
- A sequence of strings, each of which will be
presented as a choice for the user.
|
|
Validate
|
Validate ( self, value )
Exceptions
|
|
ValueError, "No choice specified for %s." % self.GetTitle()
|
|
|