1๐
โ
A quick point to note:
# This is already in settings.py
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
# After this line STATICFILES_DIRS is `[ 'BASE_DIR/static' ]`
# Added new line
ASSETS_ROOT = [
STATICFILES_DIRS,
]
# After this line, ASSETS_ROOT is `[ [ 'BASE_DIR/static' ] ]`
# i.e., an array of arrays
# I think you actually wanted:
ASSETS_ROOT = STATICFILES_DIRS[0]
# - or more explicitly -
ASSETS_ROOT = os.path.normpath(os.path.join(BASE_DIR, 'static'))
That said many of these issues look like they are being caused by a fairly non-standard django structure (i.e., that your manage.py
is in the scripts
directory rather than in BASE_DIR
).
๐ค2ps
Source:stackexchange.com