django 处理静态文件

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>

上一篇:经典优秀屏幕截图录像工具FastStone Capture推荐


下一篇:poj2739