I have a style.css file which is common across all the apps in my Django project. It is located as follows:
testsite______
|
|
testsite
|
|
news
|
|
reviews
|
|
templates------>static------>css------> style.css
|
|
manage.py
In settings.py of the project, I have STATICFILES_DIRS as follows:
STATIC_URL = '/static/'
STATICFILES_DIRS = (
"/path/to/my/project/templates/static/",
)
I call the css files in the header of my template as follows:
<html>
<head>
<title>TEst site</title>
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/style.css"/>
</head>
However, the css doesn't load. It gives a 404 error wherein the server looks for the css file inside the app (news, reviews). The error is as follows:
"GET /test-site/css/style.css HTTP/1.1" 404 4147
Do I need to specify something for css in the urls.py? What am I missing out here?
django.contrib.staticfileinINSTALLED_APPS? more heredjango.contrib.staticfileis inINSTALLED_APPS