UPDATE - it is reading the static folder correctly. If I make a test.css file and then try to go to http://myserver:8000/static/css/test.css
it will pick it up.
The problem is when i try to put a new bootstrap.css into that folder. It ignores that I have a custom one and instead uses the one that is in the python2.7/dist/mezzanine/.... folder. The templates don't have this issue when I collected them. base.html is custom and it uses mine and not the default stored copy so why isn't it doing this with the static files?
I've tried many different stackoverflow and google examples but it would seem out of the box my django/mezzanine app doesn't want to recognize the static files I'm using.
My static files are located in '/opt/myproject/static/'
settings.py
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_URL = "/static/"
STATIC_ROOT = os.path.join(PROJECT_ROOT, STATIC_URL.strip("/"))
STATIC_DIRS = (os.path.join(PROJECT_ROOT, "static"),)
I'll note that even hardcoding the path doesn't help -
STATIC_ROOT = "/opt/myproject/static/"
STATIC_DIRS = ("/opt/myproject/static",)
The base.html is the Mezzanine default so here is how it's looking for the static files -
<link rel="stylesheet" href="{% static "css/bootstrap.css" %}">
If I hardcode the location to the css there it won't find the file -
<link rel="stylesheet" href="/opt/myproject/static/css/bootstrap.css">
I'm at a loss as to why it's not picking up the static files anywhere but the mezzanine home folder. If I do a findstatic it never finds my folder only the default -
python manage.py findstatic css/bootstrap.css
Found 'css/bootstrap.css' here:
/usr/local/lib/python2.7/dist-packages/mezzanine/core/static/css/bootstrap.css
What am I doing wrong?
edit to include that I have DEBUG = True
I've done the urls.py trick -
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns += staticfiles_urlpatterns()
I've also done python manage.py runserver --unsecure