前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >ERRORS: ?: (staticfiles.E002) The STATICFILES_DIRS setting should not contain the STATIC_ROOT settin

ERRORS: ?: (staticfiles.E002) The STATICFILES_DIRS setting should not contain the STATIC_ROOT settin

作者头像
玩蛇的胖纸
发布2018-07-25 16:37:03
1.5K0
发布2018-07-25 16:37:03
举报
文章被收录于专栏:雪胖纸的玩蛇日常

Ubuntu下,运行django项目的时候失败,报错:

代码语言:javascript
复制
(env36) root@JD:~/xueyiwang# python manage.py runserver 0.0.0.0:8000 
Performing system checks...

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7f47dd74a950>
Traceback (most recent call last):
  File "/root/env36/lib/python3.6/site-packages/django/utils/autoreload.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "/root/env36/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 120, in inner_run
    self.check(display_num_errors=True)
  File "/root/env36/lib/python3.6/site-packages/django/core/management/base.py", line 410, in check
    raise SystemCheckError(msg)
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:

ERRORS:
?: (staticfiles.E002) The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting.

错误原因有可能是在settings中静态文件目录设置的有问题

代码语言:javascript
复制
STATIC_ROOT=os.path.join(BASE_DIR,"static/")#错误
STATIC_ROOT=os.path.join(BASE_DIR,"/static/")#正确
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2018-06-22 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档