我在“mysite\templates\admin”文件夹中有一个名为“default.html”的 html 表单,并且我在 setting.py 中设置了 TEMPLATE_DIR。然后我想为default.html添加一个JS,我该怎么做?
例如,我在“mysite_new\mysite\static\admin\js”中放置了一个名为“example.js”的 JS 文件,如何链接该 js 文件。
#defaul.html
<!DOCTYPE html>
<html>
<head>
<script class="xxxxx" src="xxxxxxxxxxxxxx"></script>
</head>
<body>
<fieldset>
<legend>{{ Title_name }}</legend>
<div>
<label>
<input type="checkbox" name="col" value="summary" checked="checked" />
Name
</label>
</div>
</fieldset>
</fieldset>
</body>
</html>