Simplifying karthikr's answer, you can leverage one of the already provided django template tags to accomplish this:
{{ number|stringformat:"04d" }}
Question
I need to show a list like: 1,2,3,etc but show it like: 0001,0001,0003, etc
Exists a template filter in Django to to that?
Solution
Simplifying karthikr's answer, you can leverage one of the already provided django template tags to accomplish this:
{{ number|stringformat:"04d" }}