【发布时间】:2015-02-19 18:05:34
【问题描述】:
我正在尝试执行以下操作
{% block csslinks %}
<link rel="stylesheet" type="text/css" href="{% static 'hello/style.css' %}">
{% endblock %}
我知道这是不可能的,但有什么替代方案? Django : Is it impossible to static tag into block tag? 有一个类似的问题
有人建议我去{% load staticfiles %}没有回答在这里写什么?
{% block csslinks %}
<link rel="stylesheet" type="text/css" href="what to write here to include css?">
{% endblock %}
【问题讨论】:
-
什么是不可能的,这与块外的文本有什么关系?
标签: python django django-templates django-staticfiles