i am trying to split the string in template using custom template filter. But i got an error
TemplateSyntaxError at /job/16/
\'for\' statements should u
The direct for loop works too, you just have to remove the spaces in the syntax:
<h4>Skills</h4>
{% for skill in form.instance.skills|split:"," %}
{{ skill }}
{% endfor %}
<h4>Skills</h4>
{% with form.instance.skills|split:"," as skills %}
{% for skill in skills %}
{{ skill }}<br>
{% endfor %}
{% endwith %}
For extract character string, use filter cut:
<a href="tel://+1{{ phone|cut:'-' }}">Phone</a>
this removes the scripts from the string.