【发布时间】:2014-06-22 04:47:59
【问题描述】:
我不确定如何将 css 包含到我的 html 中。我的项目中有一个应用程序,它有自己的模板文件夹。我想将sample.css 放入我的html。
<link rel="stylesheet" type="text/css" href="{% %}"> 中的一些东西
不太确定在{% %}之间放什么
结构:
/proj
/app
/templates
sample.css
sample.html
这是我的模板目录:
TEMPLATE_DIRS = (
os.path.join(BASE_DIR,'templates'),
os.path.join(BASE_DIR,'home/templates'),
os.path.join(BASE_DIR,'gallery/templates'),
os.path.join(BASE_DIR,'contact/templates'),
os.path.join(BASE_DIR,'aboutme/templates'),
)
如果需要任何其他信息。请告诉我!
更新结构
/proj
/app
/static
/css
sample.css
/templates
sample.html
【问题讨论】:
标签: css django django-templates static-files