I have a few pages. For every page I need load unique css. For all static files I use this. In the head of index.html I have:
{% block css %} {% endblock %}
But, for example, in contact.html I use:
{% extends "index.html" %} {% block css %} <link rel="stylesheet" href="{% static "css/contact.css" %}" type="text/css" /> {% endblock %}
And its print error: Invalid block tag: 'static', expected 'endblock'. How to fix it?
You need to use {% load static %}
first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With