![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | __init__ |
def | validate |
def | validate_list_contents |
def | empty |
def | default_value |
def | get_value_for_datastore |
def | make_value_from_datastore |
def | make_value_from_datastore_index_value |
![]() | |
def | __init__ |
def | __property_config__ |
def | __get__ |
def | __set__ |
def | default_value |
def | validate |
def | empty |
def | get_value_for_datastore |
def | get_updated_value_for_datastore |
def | make_value_from_datastore_index_value |
def | make_value_from_datastore |
def | datastore_type |
Public Attributes | |
item_type | |
![]() | |
verbose_name | |
name | |
default | |
required | |
validator | |
choices | |
indexed | |
creation_counter | |
model_class | |
Static Public Attributes | |
data_type = list | |
![]() | |
int | creation_counter = 0 |
data_type = str | |
A property that stores a list of things. This is a parameterized property; the parameter must be a valid non-list data type, and all items must conform to this type.
def google.appengine.ext.db.ListProperty.__init__ | ( | self, | |
item_type, | |||
verbose_name = None , |
|||
default = None , |
|||
kwds | |||
) |
Construct ListProperty. Args: item_type: Type for the list items; must be one of the allowed property types. verbose_name: Optional verbose name. default: Optional default value; if omitted, an empty list is used. **kwds: Optional additional keyword arguments, passed to base class. Note that the only permissible value for 'required' is True.
def google.appengine.ext.db.ListProperty.default_value | ( | self | ) |
Default value for list. Because the property supplied to 'default' is a static value, that value must be shallow copied to prevent all fields with default values from sharing the same instance. Returns: Copy of the default value.
def google.appengine.ext.db.ListProperty.empty | ( | self, | |
value | |||
) |
Is list property empty. [] is not an empty value. Returns: True if value is None, else false.
def google.appengine.ext.db.ListProperty.get_value_for_datastore | ( | self, | |
model_instance | |||
) |
Get value from property to send to datastore. Returns: validated list appropriate to save in the datastore.
def google.appengine.ext.db.ListProperty.make_value_from_datastore | ( | self, | |
value | |||
) |
Native representation of this property. If this list is a list of datetime.date or datetime.time, we convert the list of datetime.datetime retrieved from the entity into datetime.date or datetime.time. See base class method documentation for details.
def google.appengine.ext.db.ListProperty.validate | ( | self, | |
value | |||
) |
Validate list. Returns: A valid value. Raises: BadValueError if property is not a list whose items are instances of the item_type given to the constructor.
def google.appengine.ext.db.ListProperty.validate_list_contents | ( | self, | |
value | |||
) |
Validates that all items in the list are of the correct type. Returns: The validated list. Raises: BadValueError if the list has items are not instances of the item_type given to the constructor.