I'm using Django 1.7. When deploying my site to a Production server and running collectstatic
, I get following error message:
django.core.exceptions.ImproperlyConfigured: The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting
I use split settings; my production local.py
contains:
STATIC_ROOT = '/home/username/projects/site/static/'
and my base.py
contains:
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
According to the docs, collectstatic will copy the files from various folders into STATIC_ROOT.
Therefore, you cannot use the
STATIC_ROOT
folder inSTATICFILES_DIRS
.Solution: change
STATIC_ROOT
to e.g.STATIC_ROOT = '/home/username/projects/site/assets/'