1
From discussion on the question above, it looks like it’s not in the way you’re using the Django {% with %}
tag, but the way that you’re then using the reassigned variable in your HTML tag. Change it from
<a href={% some_url %} class={{ current_value }}>
to
<a href={% some_url %} class="{{ current_value }}">
- How to stop the accumulation while using setTimeout()?
- How to serialize relation
- Load css and js file when load a div using ajax Django
Source:stackexchange.com