File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
jinja2_humanize_extension Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 1+ import sys
12from jinja2 .ext import Extension
23from humanize import naturalsize
34
@@ -177,7 +178,13 @@ def __init__(self, environment):
177178 environment .filters ["humanize_metric" ] = humanize_metric
178179 environment .filters ["humanize_activate" ] = humanize_activate
179180 environment .filters ["humanize_deactivate" ] = humanize_deactivate
180- environment .filters ["humanize_thousands_separator" ] = (
181- humanize_thousands_separator
182- )
183181 environment .filters ["humanize_decimal_separator" ] = humanize_decimal_separator
182+ environment .filters ["humanize_thousands_separator" ] = humanize_thousands_separator
183+ if (sys .version_info .minor ) > 7 :
184+ environment .filters ["humanize_thousands_separator" ] = (
185+ humanize_thousands_separator
186+ )
187+ else :
188+ environment .filters [
189+ "humanize_thousands_separator"
190+ ] = humanize_thousands_separator
You can’t perform that action at this time.
0 commit comments