Search code examples
pythondjangoserverstaticdjango-staticfiles

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?


Solution

  • I fixed the problem after checking my NGINX config file. Now everything works good.