Home | Trees | Indices | Help |
---|
|
object --+ | Field --+ | TextField --+ | ChoiceField
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.
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
|||
Inherited from |
|
Return the options from which to choose. returns -- A sequence of strings, each of which will be presented as a choice for the user. |
Return an HTML rendering of a 'value' for this field. 'server' -- The 'WebServer' in which the HTML will be displayed. 'value' -- The value for this field. May be 'None', which renders a default value (useful for blank forms). 'style' -- The rendering style. Can be "full" or "brief" (both read-only), or "new" or "edit" or "hidden". 'name' -- The name to use for the primary HTML form element containing the value of this field, if 'style' specifies the generation of form elements. If 'name' is 'None', the value returned by 'GetHtmlFormFieldName()' should be used. returns -- A string containing the HTML representation of 'value'.
|
Validate a field value. For an acceptable type and value, return the representation of 'value' in the underlying field storage. 'value' -- A value to validate for this field. returns -- If the 'value' is valid, returns 'value' or an equivalent "canonical" version of 'value'. (For example, this function may search a hash table and return an equivalent entry from the hash table.) This function must raise an exception if the value is not valid. The string representation of the exception will be used as an error message in some situations. Implementations of this method must be idempotent.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Dec 23 12:30:40 2011 | http://epydoc.sourceforge.net |