【发布时间】:2019-07-20 09:24:04
【问题描述】:
使用 django 时如何将外部 css/js 添加到我的 html 模板中
我已经尝试过一些以前提出的问题的回复,但似乎它们已经过时了,下面是我遵循的程序之一
# after making sure the installed app has contrib.static then i make a file called static/my_apps/my.css
{%loadstatic%}
<link rel='stylesheet' href="{%static 'my_apps/my.css' %}">
# i also tried {%loadstaticfile%} but none work
【问题讨论】:
标签: django