How to concatenate strings in django templates?
django, django-templates
Solution
Use with:
{% with "shop/"|add:shop_name|add:"/base.html" as template %}
{% include template %}
{% endwith %}
Problem
I want to concatenate a string in a Django template tag, like: ``` {% extend shop/shop_name/base.html %} ``` Here `shop_name` is my variable and I want to concatenate this with rest of path. Suppose I have `shop_name=example.com` and I want result to extend `shop/example.com/base.html`.