[Python] Is there a direct approach to format numbers in jinja2?

Discussão em 'Python' iniciado por Stack, Abril 8, 2025.

  1. Stack

    Stack Membro Participativo

    I need to format decimal numbers in jinja2.

    When I need to format dates, I call the strftime() method in my template, like this:

    {{ somedate.strftime('%Y-%m-%d') }}


    I wonder if there is a similar approach to do this over numbers.

    Thanks in advance!

    Continue reading...

Compartilhe esta Página