How does one disable USE_THOUSAND_SEPARATOR for only one variable in a template?

Viewed 216

My settings.py has USE_THOUSAND_SEPARATOR = True because that's generally what I want in my templates.

However, what can I do to prevent this default behaviour for only one of my variables in a template?

{{ project_id }} currently prints "9,324", but I want it to display "9324" instead.

Cheers!

1 Answers

Filter stringformat formats the variable according to the argument, a string formatting specifier. This specifier uses the printf-style String Formatting syntax, with the exception that the leading “%” is dropped

{{ project_id|stringformat:"s" }}
Related