STATIC_URL = ‘/static/‘ #别名STATIC_ROOT=os.path.join(BASE_DIR,‘app01/static‘) #绝对路径
STATIC_URL = ‘/static/‘ STATICFILES_DIRS = ( ( os.path.join(BASE_DIR, "statics")),)
注意2(statics文件夹写在不同的app下,静态文件的调用):
STATIC_URL = ‘/static/‘ STATICFILES_DIRS = ( (‘demo_statics‘,os.path.join(BASE_DIR, "statics")),)
<script src="/static/demo_statics/jquery-1.8.2.min.js"></script>
时间: 2024-11-03 21:23:57