On Thu, May 29, 2008 at 1:15 PM, David <[EMAIL PROTECTED]> wrote:
> I had need of commas in floating-point numbers, and slightly modified
> humanize.py with a floatcomma function:
>
> def floatcomma(value):
>"""
>Converts a float to a string containing commas every three digits.
>For
I had need of commas in floating-point numbers, and slightly modified
humanize.py with a floatcomma function:
def floatcomma(value):
"""
Converts a float to a string containing commas every three digits.
For example, 3000.65 becomes '3,000.65' and -45000.00 becomes
'-45,000.00'.
Bingo, I could've sworn I remembered doing it somehow or another.
Thanks a lot,
Greg
On May 28, 7:42 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On Thu, May 29, 2008 at 7:26 AM, Greg Taylor <[EMAIL PROTECTED]> wrote:
>
> > I was wondering if there was any facility within Django that
On Thu, May 29, 2008 at 7:26 AM, Greg Taylor <[EMAIL PROTECTED]> wrote:
>
> I was wondering if there was any facility within Django that makes
> formatting numbers with commas or periods in templates possible from
> template-land. I know you can use locale.format() on the Python side,
> but was
I was wondering if there was any facility within Django that makes
formatting numbers with commas or periods in templates possible from
template-land. I know you can use locale.format() on the Python side,
but was hoping there was some tag/filter feature I missed that would
allow me to do this
5 matches
Mail list logo