![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | validate |
def | get_updated_value_for_datastore |
def | get_value_for_datastore |
def | make_value_from_datastore |
![]() | |
def | __init__ |
def | validate |
def | default_value |
def | get_updated_value_for_datastore |
![]() | |
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 |
Static Public Member Functions | |
def | now |
![]() | |
def | now |
Static Public Attributes | |
data_type = datetime.date | |
![]() | |
data_type = datetime.datetime | |
![]() | |
int | creation_counter = 0 |
data_type = str | |
Additional Inherited Members | |
![]() | |
auto_now | |
auto_now_add | |
![]() | |
verbose_name | |
name | |
default | |
required | |
validator | |
choices | |
indexed | |
creation_counter | |
model_class | |
A date property, which stores a date without a time.
def google.appengine.ext.db.DateProperty.get_updated_value_for_datastore | ( | self, | |
model_instance | |||
) |
Get new value for property to send to datastore. Returns: now() as appropriate to the date instance in the odd case where auto_now is set to True, else AUTO_UPDATE_UNCHANGED.
def google.appengine.ext.db.DateProperty.get_value_for_datastore | ( | self, | |
model_instance | |||
) |
Get value from property to send to datastore. We retrieve a datetime.date from the model instance and return a datetime.datetime instance with the time set to zero. See base class method documentation for details.
def google.appengine.ext.db.DateProperty.make_value_from_datastore | ( | self, | |
value | |||
) |
Native representation of this property. We receive a datetime.datetime retrieved from the entity and return a datetime.date instance representing its date portion. See base class method documentation for details.
|
static |
Get now as a date datetime value. Returns: 'date' part of 'now' only.
def google.appengine.ext.db.DateProperty.validate | ( | self, | |
value | |||
) |
Validate date. Returns: A valid value. Raises: BadValueError if property is not instance of 'date', or if it is an instance of 'datetime' (which is a subclass of 'date', but for all practical purposes a different type).