This repository was archived by the owner on Aug 19, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/django_sorting_bootstrap/templatetags Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def result_headers(context, cl):
27
27
continue
28
28
29
29
# OK, it is sortable if we got this far
30
- th_classes = ["sortable" , "column-{0 }" .format (field_name )]
30
+ th_classes = ["sortable" , "column-{}" .format (field_name )]
31
31
ascending = None
32
32
is_sorted = False
33
33
# Is it currently being sorted on?
@@ -76,7 +76,7 @@ def result_headers(context, cl):
76
76
"sortable" : True ,
77
77
"sorted" : is_sorted ,
78
78
"ascending" : ascending ,
79
- "class_attrib" : format_html (' class="{0 }"' , " " .join (th_classes ))
79
+ "class_attrib" : format_html (' class="{}"' , " " .join (th_classes ))
80
80
if th_classes
81
81
else "" ,
82
82
}
@@ -174,7 +174,7 @@ def auto_sort(parser, token):
174
174
tag_name , queryset = token .split_contents ()
175
175
except ValueError :
176
176
raise template .TemplateSyntaxError (
177
- "{0 } tag requires a single argument" .format (token .contents .split ()[0 ])
177
+ "{} tag requires a single argument" .format (token .contents .split ()[0 ])
178
178
)
179
179
return SortedQuerysetNode (queryset )
180
180
You can’t perform that action at this time.
0 commit comments