Yep, I want it to work like in Flask framework - there I could set parameters like this:
static_folder=os.getcwd()+\"/static/\", static_url_path=\"\"
This is really easy to accomplish with Nginx using try_files. Using the pseudo-settings below will make Nginx try to find a static file first, and if it fails then execution is passed to your django app.
server {
...
root /some/path/to/assets/;
try_files $uri @django;
location @django {
...
proxy_pass http://unix:/some/path/to/server.sock;
}
}
Example: The file /some/path/to/assets/myfile.ext
will be available as http://mydomain/myfile.ext