STATIC_URL = '/home/slon/env_slon/static/'
STATIC_ROOT = os.path.join(BASE_DIR, '/home/slon/env_slon/static/')
STATICFILES_DIRS = (
os.path.join(BASE_DIR, '/home/slon/env_slon/static/'),
)
**nginx
location /static {
root /home/slon/env_slon/static/;
try_files $uri =404;
expires max;
}
location /static/ {
root /home/slon/static;
expires 30d;
}
То есть надо копать в стороно nginx.
location /static {
root /home/slon/env_slon/static/;
try_files $uri =404;
expires max;
}
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}