Home > Enterprise >  Django bootstrap css 404 Not found
Django bootstrap css 404 Not found

Time:04-14

I'm trying to load in bootstrap into my html page but I get a 404 status code in the network tab in the developers tools saying that it could not find the file the request url is enter image description here

in my settings.py file

STATIC_URL = 'static/'

STATICFILES_DIR = [os.path.join(BASE_DIR, 'static')]

#edit wasn't included before in question
DEBUG = TRUE

Do I need to have a static folder in every folder instead of just having it in the root?

CodePudding user response:

Kindly update your settings.py

You are using this: STATICFILES_DIR = [os.path.join(BASE_DIR, 'static')]

Try this one, it should work!

STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), )

  • Related