Widget for Money values on Geraldo Reports

1
2
3
4
5
6
7
8
9
class DecimalObjectValue(ObjectValue):
    format = '%0.02f'
    def get_object_value(self, instance=None):
        value = super(DecimalObjectValue, self).get_object_value(instance)

        if not value:
            value = 0

        return self.format%value

More like this

  1. Widget for DateTime values on Geraldo Reports by marinho 5 years ago
  2. Integer based MoneyField by Jay 4 years, 7 months ago
  3. CSV to JSON Fixture by briangershon 4 years, 8 months ago
  4. django-pyodbc MoneyField by Tarken 5 years, 5 months ago
  5. GeoDjango maps in admin TabularInlines by alanB 3 years, 6 months ago

Comments

(Forgotten your password?)