Widget for DateTime values on Geraldo Reports

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)

More like this

  1. Widget for Money values on Geraldo Reports by marinho 2 years, 9 months ago
  2. TodayDateTimeField by leotr 3 years, 9 months ago
  3. db_dump.py - for dumpping and loading data from database by limodou 4 years, 11 months ago
  4. CSV to JSON Fixture by briangershon 2 years, 6 months ago
  5. Javascript Chain Select Widget by ogo 3 years, 8 months ago

Comments

(Forgotten your password?)