def validate(self, value):
    value = super(DateProperty, self).validate(value)
    if isinstance(value, datetime.datetime):
      raise BadValueError('Property %s must be a %s, not a datetime' %
                          (self.name, self.data_type.__name__))
    return value
Validate date.
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/ext/db/__init__.py/DateProperty.validate