Current error (Debug=False)
"[16/Jan/2018 15:18:42] "GET /static/style.css HTTP/1.1" 404 90"
Web site loads but broken formatting because CSS file not loaded
Logging:
On the CMD prompt it says
"[16/Jan/2018 15:49:05] "GET /beginners/ HTTP/1.1" 200 3760
[16/Jan/2018 15:49:05] "GET /static/style.css HTTP/1.1" 404 90
"
I'm not sure why this isn't working: my style.css is located in my static folder, and the static folder is the same folder as manage.py
When I set Debug = True, I reload the page and it works fine - my static folder is active and I get no static error:
[16/Jan/2018 15:58:11] "GET /beginners/? HTTP/1.1" 200 3759
[16/Jan/2018 15:58:11] "GET /static/style.css HTTP/1.1" 200 5014
Please help!!
STATIC_URL = '/static/'
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(PROJECT_DIR, 'static')
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
DEBUG = True
ALLOWED_HOSTS = ['127.0.0.1']
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))