Variables in the Django template
📁 django
I would like to use the {% url %} tag in order to do something, and I encountered the following problem:
-
I pass a model containing pages
{% for page in pages %}
-
I want to insert the page name in the parameter, but Django complains about this syntax
{% url 'blog.views.view' page_name={{ page.name }} %}
{% endfor %}
Please tell me what I am doing wrong