I am new to programming and currently Django will not render my CSS. This is the html request
GET http://127.0.0.1:8000/static/blog/main.css net::ERR_ABORTED 404 (Not Found)
Here's my current set up and what I know to be required for using static files. I don't understand how my paths are wrong if they are?
My current DIR
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
In my settings.py...it is installed.
/Users/jason/PycharmProjects/blog/mysite/mysite/settings.py
INSTALLED_APPS = [
'blog.apps.BlogConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
along with URL defined
STATIC_URL = '/static/'
This is my filepath for my css file
/Users/jason/PycharmProjects/blog/mysite/blog/static/blog/main
and this is my html header
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'blog/main.css' %}">
my project urls
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('blog.urls')),
]
my app urls
urlpatterns = [
path('', views.home, name='blog-home'),
path('about/', views.about, name='blog-about'),