英文:
django-STATICFILES _DIRS not collecting
问题
In my django project settings, I defined my static files like so:
STATIC_URL = 'static/'
STATIC_ROOT = BASE_DIR + '/static/'
STATICFILES_DIRS = [
BASE_DIR + '/folder1',
BASE_DIR + '/folder2',
]
But collectstatic doesn't collect what is defined in "STATICFILES_DIRS".
Even though it works locally, on the server it doesn't work.
What am I doing wrong?
英文:
In my django project settings, I defined my static files like so:
STATIC_URL = 'static/'
STATIC_ROOT = BASE_DIR + '/static'
STATICFILES_DIRS = [
BASE_DIR +'/folder1',
BASE_DIR + '/folder2',
]
But collectstatic doesn't collect what is defined in "STATICFILES_DIRS".
Even though it works locally, on the server it doesn't work.
What am I doing wrong?
答案1
得分: 0
我检查了我的NGINX配置文件后,解决了问题。现在一切都正常工作。
英文:
I fixed the problem after checking my NGINX config file.
Now everything works good.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论