Django静态文件路径设置
提示 :
Error fetching command 'collectstatic': You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.
Command 'collectstatic' skipped
解决方法:settings.py添加
1 STATIC_ROOT = os.path.join(BASE_DIR, '/static/') 2 3 STATIC_URL = '/static/' 4 STATICFILES_DIRS = [ 5 os.path.join(BASE_DIR,'static') 6 ]
作者: AntzUhl
首发地址博客园:http://www.cnblogs.com/LexMoon/
代码均可在Github上找到(求Star) : Github
个人博客 : http://antzuhl.cn/
公众号 |
赞助
支付宝 |
微信 |