1đź‘Ť
You haven’t used the exact settings in the docs…Which is fine, but you need to at least do the following, if DEBUG = False
:
- Set up
STATICFILES_DIRS
. This should be the absolute path to the folder where your static assets live (before they’re “collected”). - Set up
STATIC_ROOT
. This is different than the above path, and is where all of your static assets will be collected when you runcollectstatic
. - Run the
collectstatic
command to collect (i.e. copy) your assets from yourSTATICFILES_DIRS
to yourSTATIC_ROOT
Depending on your configuration, and if DEBUG = True
, you don’t even need to define STATIC_ROOT
in development mode.
👤rnevius
Source:stackexchange.com