【转】Django添加静态文件设置
STATIC_URL = '/statics/'
STATIC_ROOT= os.path.join(BASE_DIR, 'statics')
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'app01/statics'),
)
TEMPLATE_DIRS = (
os.path.join(BASE_DIR, 'templates'),
)
页面引用
<img src="/statics/images/1.jpg"

浙公网安备 33010602011771号