【发布时间】:2021-03-06 08:49:32
【问题描述】:
我正在尝试使用命令 python manage.py collectstaic 在 django 中收集静态文件,但我不断收到错误 The system cannot find the path specified: 'C:\\Users\\Habib\\Documents\\django\\FIVERR\\Eduo\\OTTO\\staticfiles'
我已经配置了 STATICFILES_DIRS 但它仍然不起作用。
settings.py
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "/static/")
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'staticfiles')]
MEDIA_URL = '/media/'
MEDIA_ROOT = '/media/'
【问题讨论】: