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 Oct. 30, 2022, 1:21 p.m. EST