title: How to prevent Django from localizing IDs in templates?
body: <p>I have recently upgraded to Django 1.2.5, and now I am having problems with localization, specifically number formatting. For example, in some templates I print the following samples:</p>
  
  <pre><code>data-id="{{ form.instance.id }}"
  </code></pre>
  
  <p>Which in cases >= 1000, used to evaluate to:</p>
  
  <pre><code>data-id="1235"
  </code></pre>
  
  <p>But now it actually results in (my localization is pt-BR, our decimal separator is dot):</p>
  
  <pre><code>data-id="1.235"
  </code></pre>
  
  <p>Which of course is not found when I afterwards query the database by ID. Using a <code>|safe</code> filter solves the problem, but I'm not willing to find all IDs in all templates and safe them.</p>
  
  <p>Usually, I'll only localize the <strong>floating points, not the integers</strong>. I don't want to disable L10N, because of all the other formatting that is working fine. <strong>Is there a way to make this distinction in Django localization?</strong> Any other solution is accepted.</p>