App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
google.appengine.ext.db.djangoforms.ModelChoiceField Class Reference
Inheritance diagram for google.appengine.ext.db.djangoforms.ModelChoiceField:

Public Member Functions

def __init__
 
def clean
 

Public Attributes

 empty_label
 
 reference_class
 

Static Public Attributes

dictionary default_error_messages
 

Properties

 query = property(_get_query, _set_query)
 
 choices = property(_get_choices, _set_choices)
 

Constructor & Destructor Documentation

def google.appengine.ext.db.djangoforms.ModelChoiceField.__init__ (   self,
  reference_class,
  query = None,
  choices = None,
  empty_label = u'---------',
  required = True,
  widget = forms.Select,
  label = None,
  initial = None,
  help_text = None,
  args,
  kwargs 
)
Constructor.

Args:
  reference_class: required; the db.Model subclass used in the reference
  query: optional db.Query; default db.Query(reference_class)
  choices: optional explicit list of (value, label) pairs representing
available choices; defaults to dynamically iterating over the
query argument (or its default)
  empty_label: label to be used for the default selection item in
the widget; this is prepended to the choices
  required, widget, label, initial, help_text, *args, **kwargs:
like for forms.Field.__init__(); widget defaults to forms.Select

Member Function Documentation

def google.appengine.ext.db.djangoforms.ModelChoiceField.clean (   self,
  value 
)
Override Field.clean() to do reference-specific value cleaning.

This turns a non-empty value into a model instance.

Member Data Documentation

dictionary google.appengine.ext.db.djangoforms.ModelChoiceField.default_error_messages
static
Initial value:
1 = {
2  'invalid_choice': _(u'Please select a valid choice. '
3  u'That choice is not one of the available choices.'),
4  }

The documentation for this class was generated from the following file: