ImproperlyConfigured staticfiles
You are getting this error because your settings variables STATIC_ROOT
and STATICFILES_DIRS
contain exactly the same path (os.path.join(BASE_DIR, 'static')
). This is an invalid configuration.
STATIC_ROOT
is the absolute path to where you want Django to put the static files that are collected using collectstatic
. Your web server will serve static files from this directory.
STATICFILES_DIRS
is a list of directories where you want collectstatic
to look when collecting the static files. If cannot include STATIC_ROOT
or any subdirectory of it.
Try removing the STATICFILES_DIRS
setting and see if that works. If you have put static files in some non-standard location then change the setting to include that location.
Maybe you haven't given the STATIC_ROOT path in Django setting.py so please check it again and if not provided give the path. give the path of your choice and then run the command it will run.