Seems weird that no one have had this problem before... Maybe no one
is using any other locale than en-us?

Anyway, I solved it by making a custom template filter called
"dotify", which if it gets a floating point number, converts it to a
string, and replaces all commas with "dots":

def dotify(value):
    if isinstance(value, basestring):
        return string.replace(',', '.')
    elif isinstance(value, float):
        return ('%f' % value).replace(',', '.')
    else:
        return value
dotify = register.filter(dotify)

/ Joachim

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to