Kod z ksiażki "Django 4 by example" https://github.com/PacktPublishing/Django-4-by-example/blob/main/Chapter04/bookmarks/account/templates/base.html
<li {% if section == "dashboard" %}class="selected"{% endif %}>
<a href="{% url "dashboard" %}">My dashboard</a>
</li>
Problem z zastosowaniem {% if condition %}
wewnatrz tagu <li>
, dostaję błąd:
TemplateSyntaxError at /account/
Could not parse the remainder: '=="dashboard"' from 'section=="dashboard"'
Request Method: GET
Request URL: http://127.0.0.1:8000/account/
Django Version: 4.2.1
Exception Type: TemplateSyntaxError
Exception Value:
Could not parse the remainder: '=="dashboard"' from 'section=="dashboard"'
Problem z VS Code?