How to disable formatting for FloatField in template for Django

Viewed 16826

i just can't seem to find a definitive answer to this issue, and django's irc needs auth to services... So my question is : how can you force some kind of formatting for FloatFields in template when you're using Django ?

The problem is simple i need simple dot separated numbers like this : 42547.34 And i end up with comma separated values...

here is a example of template where the problem occurs :

{% for point in zone.points.all  %}
  {% if forloop.last %}
    new google.maps.LatLng({{point.latitude|floatformat}},{{point.longitude|floatformat}})
  {% else %} 
    new google.maps.LatLng({{point.latitude|floatformat}},{{point.longitude|floatformat}}),
  {% endif %}
{% endfor %}];

Thank you for your time.

P.S. i don't have this problem when using the admin generated forms where the floats appear correctly (My locale is en_US)

7 Answers
Related