Roundup Tracker - Issues

Message3750

Author ber
Recipients ber
Date 2009-07-08.10:44:17
Message-id <1247049858.2.0.393762044748.issue2550559@psf.upfronthosting.co.za>
In-reply-to
It would be nice to have a way to pretty print "Number"s.

It probably would be implemented in
roundup/cgi/templating.py class NumberHTMLProperty()
like
    def pretty(self, format=_default)
similiar to the one for Date.

The use case is for attribues that are used as Integers
e.g. not displaying "90.0" and for numbers that are better shown
with spaces in front like amounts.
It could all be done with regular % python formatting.
Currently it cannot be done directly easily,
because the value can also be None, so __float__() from class Number
does not always work.
History
Date User Action Args
2009-07-08 10:44:18bersetmessageid: <1247049858.2.0.393762044748.issue2550559@psf.upfronthosting.co.za>
2009-07-08 10:44:18bersetrecipients: + ber
2009-07-08 10:44:18berlinkissue2550559 messages
2009-07-08 10:44:17bercreate