X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=roundup%2Fcgi%2Ftemplating.py;h=ae4f0fa3dd31003560c45abd0559c425caa78146;hb=4a20408dd8ce16b1d159cb7acd78a511ef9b8ad0;hp=0984bc137a2f1e6681e63b577e400e36a89f4fce;hpb=44c0055d32e707cb1cbca9244001073c2b5635b1;p=roundup.git diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index 0984bc1..ae4f0fa 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -924,6 +924,17 @@ class NumberHTMLProperty(HTMLProperty): value = '"'.join(value.split('"')) return ''%(self._formname, value, size) + def __int__(self): + ''' Return an int of me + ''' + return int(self._value) + + def __float__(self): + ''' Return a float of me + ''' + return float(self._value) + + class BooleanHTMLProperty(HTMLProperty): def plain(self): ''' Render a "plain" representation of the property