1 2 3 4 5 6 7 8 9 | class DateTimeObjectValue(ObjectValue):
format = '%m/%d/%Y %H:%M'
def get_object_value(self, instance=None):
value = super(DateTimeObjectValue, self).get_object_value(instance)
if not value:
return ''
return value.strftime(self.format)
|
Comments