'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).'

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
