вот структура проекта:
mysite
|-- manage.py
|-- mysite
|-- __init__.py
|-- settings.py
|-- urls.py
|-- wsgi.py
|-- myapp
|-- __init__.py
|-- models.py
|-- tests.py
|-- views.py
|-- static_content
|-- temaplate
|-- index.html
|-- static
|-- style.css
settings.py:
STATIC_URL = '/static_content/static/'
index.html:
{% load static %}
<html>
<head>
<title>Hello Static Files</title>
<link rel="stylesheet" href="{% static 'style.css' %}" type="text/css">
</head>
<body>
<h1>Hello Static Files</h1>, {{hello}}
</body>
</html>
то что получаем на выходе по ссылке myproject.com/hello/
<html>
<head>
<title>Hello Static Files</title>
<link rel="stylesheet" href="/static_content/static/style.css" type="text/css">
</head>
<body>
<h1>Hello Static Files</h1>, hello
</body>
</html>
nginx myproject.conf конфиг проекта
upstream myproject.com {
server localhost:12345 fail_timeout=0;
}
server {
listen 80;
server_name www.myproject.com;
rewrite ^/(.*) http://myproject.com/$1 permanent;
}
server {
listen 80;
client_max_body_size 4G;
server_name myproject.com;
access_log /home/vince/project/mysite/logs/myproject.access.log;
keepalive_timeout 5;
root /home/vince/project/mysite/myapp/static_content;
location / {
proxy_pass http://myproject.com;
}
location ~ ^/(static|media)/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
if (!-f $request_filename) {
proxy_pass http://myproject.com;
break;
}
}
}
вообщем style.css не цепляет и не подгружает.. цвет надписей так и не меняется.. куда копать и что делать?