Joins a list on s
. Works just like Python’s s.join(value)
.
Variable
veggies = ['Tomatoes', 'Cucumbers', 'Peas']
Template
{{ veggies|join:', ' }}
Result
Tomatoes, Cucumbers, Peas
Argument: s
(Optional)
Joins a list on s
. Works just like Python’s s.join(value)
.
veggies = ['Tomatoes', 'Cucumbers', 'Peas']
{{ veggies|join:', ' }}
Tomatoes, Cucumbers, Peas
Did we get something wrong? Is there a use case for the
join
filter that we should add?
Please let us know.