Roundup Tracker - Issues

Issue 2550559

classification
Title: Pretty printing / formatting for Number types.
Type: rfe Severity: normal
Components: Web interface Versions:
process
Status: new Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ber, chichi
Priority: normal Keywords: Effort-Low

Created on 2009-07-08 10:44 by ber, last changed 2016-07-04 19:57 by rouilj.

Messages
msg3750 Author: [hidden] (ber) Date: 2009-07-08 10:44
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.
msg4095 Author: [hidden] (chichi) Date: 2010-07-16 08:22
Anybody has any idea about this?

Thanks!
msg4097 Author: [hidden] (ber) Date: 2010-07-20 09:12
Well it just needs to be implemented.
msg4099 Author: [hidden] (chichi) Date: 2010-07-22 08:24
Yap...:p
History
Date User Action Args
2016-07-04 19:57:09rouiljsetfiles: - unnamed
2016-07-04 19:39:45rouiljsetkeywords: + Effort-Low
2010-07-22 08:24:54chichisetfiles: + unnamed
messages: + msg4099
2010-07-20 09:12:12bersetmessages: + msg4097
2010-07-16 08:22:22chichisetmessages: + msg4095
2010-03-08 06:04:23chichisetnosy: + chichi
2009-07-08 10:44:18bercreate