Django bootstrap files missing when static changed

Viewed 16

I have changed my django debug to false. I am now missing the bootstrap files, previously found in the static directory. The console output shows i'm getting 404s on the bootstrap files.

debug output:

Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
[23/Sep/2022 12:49:42] "GET /login/?next=/ HTTP/1.1" 200 2853
[23/Sep/2022 12:49:42] "GET /static/css/bootstrap.min.css HTTP/1.1" 404 179
[23/Sep/2022 12:49:42] "GET /static/orchestration/main.css HTTP/1.1" 404 179
[23/Sep/2022 12:49:42] "GET /static/js/jquery.min.js HTTP/1.1" 404 179
[23/Sep/2022 12:49:42] "GET /static/js/popper.min.js HTTP/1.1" 404 179
[23/Sep/2022 12:49:42] "GET /static/js/bootstrap.min.js HTTP/1.1" 404 179
[23/Sep/2022 12:49:42] "GET /static/js/bootstrap.min.js HTTP/1.1" 404 179

settings.py

STATIC_URL = 'static/'
#----
STATIC_ROOT = os.path.join(BASE_DIR, 'root')
#----
STATICFILES_DIRS = [
        os.path.join(BASE_DIR, 'static'),
        os.path.join(BASE_DIR, 'boot'),
]

I have run python3 manage.py collectstatic. It has copied all these files to the root directory. I was expecting it just to look in the root directory to find them.

0 Answers
Related