当我在本地部署时,我的静态文件不存在
我的Procfile是web: gunicorn news_site_prj.wsgi:application
控制台没有任何带有静态文件的错误
heroku local web
[OKAY] Loaded ENV .env File as KEY=VALUE Format
21:46:38 web.1 | [2017-10-12 21:46:38 +0100] [34267] [INFO] Starting gunicorn 19.7.1
21:46:38 web.1 | [2017-10-12 21:46:38 +0100] [34267] [INFO] Listening at: http://0.0.0.0:5000 (34267)
21:46:38 web.1 | [2017-10-12 21:46:38 +0100] [34267] [INFO] Using worker: sync
21:46:38 web.1 | [2017-10-12 21:46:38 +0100] [34270] [INFO] Booting worker with pid: 34270
settings.py
中对静态文件的引用# Static files (CSS, JavaScript, Images)
STATIC_URL = '/static/'
STATIC_ROOT = ''
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "./static"), # static directory at the project level
)