setting.py中设置
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static').replace('\', '/'),
)
node2:/django#find . -name static
./mysite/static
html 引入:
node2:/django/mysite/news/templates#cat login.html
<h1>泰隆银行运维管理平台</h1>
<img src="/static/scan.jpg"/>
<form method = 'post'>
{{uf.as_p}}
<input type="submit" value = "ok"/>
</form>