Tutorials References Exercises Videos Menu
Free Website Get Certified Upgrade

Template Filter - join


Example

Join all items in a list into a string, using a hash character as separator:

<h1>{{ fruits|join:"#" }}</h1>
Run Example »

Definition and Usage

The join filter takes all items in an iterable and joins them into one string.

A string must be specified as the separator.


Syntax

{{ value|join:separator }}

Template filters are defined by using a pipe | character followed by the name of the filter.

Arguments are defined by using a colon : character followed by the argument value(s).


Arguments

Value Description
separator Required. A string representing the separator.