?: (staticfiles.E002) The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting.
完整報錯如下:
Exception in thread django-main-thread:
Traceback (most recent call last):
File “/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/threading.py”, line 916, in _bootstrap_inner
self.run()
File “/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/threading.py”, line 864, in run
self._target(*self._args, **self._kwargs)
File “/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/site-packages/django/utils/autoreload.py”, line 54, in wrapper
fn(*args, **kwargs)
File “/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/site-packages/django/core/management/commands/runserver.py”, line 117, in inner_run
self.check(display_num_errors=True)
File “/home/appleyuchi/anaconda3/envs/Python3.6/lib/python3.6/site-packages/django/core/management/base.py”, line 436, 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.
System check identified 1 issue (0 silenced).
解決方案:
STATIC_ROOT = ‘/home/appleyuchi/桌面/Ebusiness/天天生鮮-以后再迭代/Django2_dailyfresh-python3版本/static/’
改為:
STATIC_ROOT = os.path.join(BASE_DIR,"/static/")
所以說報錯信息其實很具有誤導性。
總結
以上是生活随笔為你收集整理的?: (staticfiles.E002) The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting.的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 台式机能源参考参数
- 下一篇: 中国银行app怎么存定期存款(目前的中国