I followed some tips from related questions in here, and tried the documentation but failed so far to get css file working.
Note that css (obviously) works perfectly fine if I place it within the template, but I can't import it from static folder.
So in my app folder, I created a static folder, within which I created another folder called static: app->static->style.css
When I run collectstatic, it gets style.css, and places it in: projectfolder->static->style.css
All of this is working fine.
My static settings were set automatically, I changed it based on some answers I read in related questions, but still didn't work:
MEDIA_ROOT = u'/home/user/projectfolder/media'
MEDIA_URL = '/media/'
STATIC_ROOT = u'/home/user/projectfolder/static'
STATIC_URL = '/static/'
In my template, I have:
{% load staticfiles %}
....
<head>
<link rel="stylesheet" href="{{ STATIC_URL }}style.css" />
....
Clearly I'm missing something, when I reload the website, no css is shown. In my css I have clearly set the body background to test it, but it doesn't change.
Extra info: - Debug is set to true - Using the latest Django version .10
Any help or direction would be appreciated,
thanks in advance.
"{% static 'myapp/style.css' %}"wheremyappis the app name of course.