[Fixed]-How to use variables passed from view to template within conditions in templates django? 22 December 2023 by thecoderscamp.com 1 You don’t need extra parentheses inside: <div class="{% if content_type == 1 %} abc {% endif %}"></div> Shang Wang Formatting Django request cookies Source:stackexchange.com