1.首先需要设置static文件的位置,在setting文件中设置
2.在html中通过{% load staticfiles %}加载,并调用,如下
Django中关于导入静态文件的方法
原文:https://www.cnblogs.com/wangyi891224/p/9047479.html