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 4 years, 2 months ago
  2. TodayDateTimeField by leotr 5 years, 2 months ago
  3. Vertical and Horizontal Line to geraldo report by lucmult 3 years, 1 month ago
  4. SelectTimeWidget by bradmontgomery 4 years, 7 months ago
  5. Complete Persian DateTime Widget by serj1975 1 year, 6 months ago

Comments

Surabhi (on July 12, 2012):

Hi All, Can anyone suggest how to rounded off a number to a near integer value in Geraldo reports. I am unable to do this and could not find any snippets as well. I am using Django with Geraldo report to print PDF reports.

If anyone provide quick response on this appreciated.

Thanks, Surabhi

#

(Forgotten your password?)