2👍
If you have declared your ‘STATICFILES_DIRS’ variable as below,
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
ensure:
- a static folder (the folder must be named as you specified in the ‘STATICFILES_DIRS’ variable) exists.
- it contains a file. You can name a dummy file as ‘.any’ if you’ve got no file yet.
1👍
Currently, it seems that the error comes from the STATICFILES_DIRS var points to a directory that does not exist:
STATICFILES_DIRS = (os.path.join(os.path.dirname(BASE_DIR), "static", "static" )
Go to your Django project directory, find the static repository, and note the absolute location.
Then, edit the STATICFILES_DIRS variable in settings.py sothat it points to this location.
For me (that does not imply it should be the same for you), it looks like this:
STATICFILES_DIRS = (os.path.join(BASE_DIR, '../myapp/static'),)
- [Django]-How to set max length on integerfield Django Rest
- [Django]-Calculate average exchange rate for time period
- [Django]-Error connecting Django 2.0 with sql server 2014 using python 3.6
Source:stackexchange.com