Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

278
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!