标签:url join dir 静态文件 conf tin static query src
settings:
STATIC_URL = ‘static/‘
STATIC_ROOT = os.path.join(BASE_DIR, ‘static‘)
urls:
from django.conf import settings
from django.conf.urls.static import static
末尾加
+ static(settings.STATIC_URL, document_root = settings.STATIC_ROOT)
在模板里:
<script type="text/javascript" src="/static/js/jquery.js"></script>
标签:url join dir 静态文件 conf tin static query src
原文地址:https://www.cnblogs.com/pythonClub/p/10355059.html