0
如何在一個模板中使用另一個style.css?如何在一個模板中使用另一個style.css?
例如:
{% extends "base.html" %}
{% block content %}
<p>Here I need to use another css file (not the same like on base.html)</p>
{% endblock %}
這可能嗎?
如何在一個模板中使用另一個style.css?如何在一個模板中使用另一個style.css?
例如:
{% extends "base.html" %}
{% block content %}
<p>Here I need to use another css file (not the same like on base.html)</p>
{% endblock %}
這可能嗎?
base.html文件
<html>
<head>
<title>{% block title %}{% endblock %}</title>
{% block css %}{% endblock css %}
</head>
<body>
{% block content %}{% endblock content %}
</body>
</html>
其他模板
{% extends "base.html" %}
{% block css %}
{{block.super}}
//css here
{% endblock css %}
{% block content %}
<p>Here I need to use another css file (not the same like on base.html)</p>
{% endblock content %}