【发布时间】:2020-12-14 04:05:10
【问题描述】:
我去了这条路线http://127.0.0.1:8000/static/corefiles/chatbot-data.xlsx,但我得到Page not found (404)错误...
我将这些添加到 URL:
+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
文件目录为/rootproject/core/static/corefiles/testexel.xlsx
我的settings.py:
STATIC_URL = '/static/'
STATICFILES_DIRS = ( normpath(加入(BASE_DIR,'静态')), normpath(join(BASE_DIR, 'upload')), )
STATIC_ROOT = normpath(join(BASE_DIR, 'assets'))
【问题讨论】:
标签: django static-files