My html file isn't reading my css file - I've tried searching for all related questions on this issue, but still can't get the css file to be read. Here's what I have:
settings.py
import os
import os.path
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
...
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
...
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "form/static")
)
Beginning of index.html
{% load staticfiles %}
<!DOCTYPE html>
<html leng="en">
<head>
<title>Test</title>
<link rel="stylesheet"
href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet"
href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-
theme.min.css">
<link rel="stylesheet" href="{% static 'css/main.css' %}" />
</head>
My "static" and "templates" folder are on the same level, and main.css is at static/css/main.css
Edit: If it helps, my bootstrap links are being recognized, only main.css is not.
Update: Removed STATICFILES_DIRS from settings.py and added STATIC_ROOT = os.path.join(BASE_DIR, "form/static") as above.
My file structure:
app
app
- settings.py
form
- static
- css
- main.css
- templates
- form
- index.html