join Filter

Data Structure

Argument: s (Optional)

Documentation

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

Did we get something wrong? Is there a use case for the join filter that we should add? Please let us know.

Send Feedback

Official Documentation
This page last updated on Sept. 16, 2020, 7:34 p.m. EST