Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

275
Vistas
how to turn off l10N for django-money values

I use {% load l10n %} and it works great.

But it formats Money('55652.69924091', 'USD') (from the package django-money) into 55652.70 USD, which is generally ok, but in one place i need to get 55652.6992 USD (decimal places increase to 4).

I tried {% localize off %}{{ object.value }} {% endlocalize %} but no effect.

I can do it with .amount, but this is ugly.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

From django-money's documentation on Format Localization it has a template tag called as money_localize which you can use to turn localization on / off for specific values. Hence you can write:

{% load djmoney %}
...
{% money_localize object.value off %}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda