Im getting this error "GET /static/bootstrap.min.css.css HTTP/1.1" 404 68 in my terminal whenever I update my page with prod.py I build. I think it's my code in my settings.py that is wrong and with the static files also.
there are my codes
1. B_F1 #project name
2-1. B_F1
3. settings
4-1. base.py
4-2. dev.py
4-3. prod.py # i use it when i publish
2-2. B_F_user # app name
2-3. static
3. bootstrap.min.css
this is base.py code
from pathlib import Path
import os
import json
from django.core.exceptions import ImproperlyConfigured
BASE_DIR = Path(__file__).resolve().parent.parent.parent
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'B_F_user',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'B_F1.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
and this is prod.py code
from .base import *
DEBUG = False
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
and it my base.html
<!DOCTYPE html>
<html>
{% load static %}
<head>
<meta charset="utf-8">
<meta name = "viewport" content = "width=device-width, initial-scale=1">
<link rel="stylesheet" href="/static/bootstrap.min.css"/>
i used manage.py collectstaic
but it's still not working with this address
You have requested to collect static files at the destination
location as specified in your settings:
/Users/sungsmacpro/tmp/B_F_non_session/B_F1/static
This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
what should i fix it?