|
| empty_label |
|
| reference_class |
|
|
dictionary | default_error_messages |
|
|
| query = property(_get_query, _set_query) |
|
| choices = property(_get_choices, _set_choices) |
|
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
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.
dictionary google.appengine.ext.db.djangoforms.ModelChoiceField.default_error_messages |
|
static |
Initial value:
2 'invalid_choice': _(
u'Please select a valid choice. '
3 u'That choice is not one of the available choices.'),
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/ext/db/djangoforms.py