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
- Widget for DateTime values on Geraldo Reports by marinho 2 years, 9 months ago
- Integer based MoneyField by Jay 2 years, 4 months ago
- Javascript Chain Select Widget by ogo 3 years, 8 months ago
- CSV to JSON Fixture by briangershon 2 years, 6 months ago
- Feet and Inches FormField/Widget by btaylordesign 1 year ago
Comments