I'm a little confused with Django's static files.
I understand they are not served in development however in my production environment I have tried everything to change the URL for the files which are being server. It just doesnt make any sence to me.
Everything is still being served via /static/
with my URL's even after changing STATIC_URL
.
settings.py
STATIC_ROOT = os.path.join(BASE_DIR, 'dsadsa')
STATIC_URL = '/ddd/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'app/static'),
]
From those setting I expect all my static files to end up inside of a directory called dsadsa
and server with a url www.example.com/ddd/file.css
however this is just not the case they always get served via www.example.com/static/file.css
from the directory staticfiles
.
I'm running this project in Heroku with no Debug = False
Can anyone please help me understand what on earth I'm missing here?
Update:
I'm using {% load static %}
within the templates.
Example template usage:
<img alt="background" src="{% static "img/inner-6.jpg" %}" />