When I tried to issue commands to collect staticfiles
In [41]: ! python manage.py collectstatic
It throw FileNotFoundError:
FileNotFoundError: [Errno 2] No such file or directory:
'/Users/me/Desktop/Django/forum/static'
Nevertheless, there exist file '/Users/me/Desktop/Django/forum/static'
In [44]: ! tree -L 2
.
├── db.sqlite3
├── forum
│ ├── __init__.py
│ ├── __pycache__
│ ├── settings.py
│ ├── static
│ ├── templates
│ ├── urls.py
│ └── wsgi.py
├── forums
│ ├── __init__.py
│ ├── __pycache__
│ ├── admin.py
│ ├── apps.py
│ ├── migrations
│ ├── models.py
│ ├── static
│ ├── templates
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── ll_forum
│ ├── bin
│ ├── include
│ ├── lib
│ ├── pip-selfcheck.json
│ ├── pyvenv.cfg
│ └── share
└── manage.py
14 directories, 15 files
The setting.py
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
#my apps
"forums"
]
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "static"), #notice the comma
)