On Thu, 2008-08-28 at 10:54 -0400, Keith Eberle wrote:
> I use similar functions for some of my template filters, but I use
> locale instead.
>
> import locale
> locale.setlocale(locale.LC_ALL, '')
Unfortunately that has problems if your application is expected to work
in multiple locales. Beca
I use similar functions for some of my template filters, but I use locale
instead.
import locale
locale.setlocale(locale.LC_ALL, '')
def whole_currency(value):
return locale.format_string("$%0.f", value, grouping=True)
def decimal_currency(value):
return locale.format_string("$%0.2f", va
On 28 Ago, 16:47, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> Hi Nicola,
>
> On Aug 28, 10:12 am, Nicola Murino <[EMAIL PROTECTED]> wrote:
>
>
>
> > I think for european user an intpoint function in contrib.humanize
> > would be very useful
>
> > here is the code (copied from intcomma)
>
> > def
Hi Nicola,
On Aug 28, 10:12 am, Nicola Murino <[EMAIL PROTECTED]> wrote:
> I think for european user an intpoint function in contrib.humanize
> would be very useful
>
> here is the code (copied from intcomma)
>
> def intpoint(value):
> """
> Converts an integer to a string containing comm
I think for european user an intpoint function in contrib.humanize
would be very useful
here is the code (copied from intcomma)
def intpoint(value):
"""
Converts an integer to a string containing commas every three
digits.
For example, 3000 becomes '3,000' and 45000 becomes '45,000'.
5 matches
Mail list logo