Format numbers in django templates

前端 未结 13 1191
清歌不尽
清歌不尽 2020-11-29 17:22

I\'m trying to format numbers. Examples:

1     => 1
12    => 12
123   => 123
1234  => 1,234
12345 => 12,345

It strikes as a

13条回答
  •  鱼传尺愫
    2020-11-29 18:25

    In case someone stumbles upon this, in Django 2.0.2 you can use this

    Thousand separator. Be sure to read format localization as well.

提交回复
热议问题