Open rdbo opened 8 months ago
Today a custom filter is the only thing you can do. I would love to have a formatting filter in minijinja-contrib
but it's quite a bit of effort to create and I did not have the time yet. Happy to accept contributions.
I tried the following ways to format a float to have 2 decimal place precision, but neither worked:
Result:
invalid operation: tried to use % operator on unsupported types string and number
Result:
unknown filter: filter format is unknown
Is it possible to format strings like this without creating a custom filter? If so, what is the proper way to do it?