Table of Contents

Class: ChoiceField qm/fields.py

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.

Base Classes   
TextField
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.
Exceptions   
NotImplementedError
  Validate 
Validate ( self,  value )

Exceptions   
ValueError, "No choice specified for %s." % self.GetTitle()

Table of Contents

This document was automatically generated on Mon Jan 3 09:42:29 2005 by HappyDoc version 2.1