It was working fine, but for some reason, I have to change the staticfiles code and from there problem occurs.
settings.py
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'blackportfolio/static'),
]
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
Staticfiles are creating my all css files are getting copy in staticfiles, browser also getting the staticfiles name <link rel="stylesheet" href="/static/style.2f83ab2e5052.css">
But its not searching them in static_root(staticfiles)
it still searching them in static python manage.py findstatic --verbosity 2 styles.css
but it returns with C:\Users\HP\Desktop\vir1\blackportfolio\blackportfolio/static
C:\Users\HP\Desktop\vir1\venv\lib\site-packages\django\contrib\admin\static
the command I type.
manage.py collectstatic --clear
manage.py runserver --insecure.
project structure.
C:.
├───blackportfolio
│ ├───static
│ │ ├───admin
│ │ │ ├───css
│ │ │ │ └───vendor
│ │ │ │ └───select2
│ │ │ ├───fonts
│ │ │ ├───img
│ │ │ │ └───gis
│ │ │ └───js
│ │ │ ├───admin
│ │ │ └───vendor
│ │ │ ├───jquery
│ │ │ ├───select2
│ │ │ │ └───i18n
│ │ │ └───xregexp
│ │ └───images
│ └───__pycache__
├───portfolio
│ ├───migrations
│ │ └───__pycache__
│ └───__pycache__
├───staticfiles
│ ├───admin
│ │ ├───css
│ │ │ └───vendor
│ │ │ └───select2
│ │ ├───fonts
│ │ ├───img
│ │ │ └───gis
│ │ └───js
│ │ ├───admin
│ │ └───vendor
│ │ ├───jquery
│ │ ├───select2
│ │ │ └───i18n
│ │ └───xregexp
│ └───images
└───templates