I followed this tutorial for develop templates with flask http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-ii-templates
My file tree is the next one:
/static
/js
bootstrap.min.js
jquery_1.11.3.js
/css
bootstrap.min.css
/images
/templates
index.html
/python_venv
server.py
server.py code:
@app.route('/subdomain/')
def getPrevisionPoblacion():
return render_template('index.html')
And css link inside index.html code is the following:
<script src="/static/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="/static/css/bootstrap.min.css"/>
<script src="/static/js/jquery_1.11.3.js"></script>
nginx config:
location /subdomain/{
root /apps/subdomain/static;
uwsgi_pass unix:///tmp/subdomain.sock;
include uwsgi_params;
}
When I check it on Chrome, the index didn't load the CSS files. I checked the network with Developer's tools and the error is 404. I tried also similar code that i saw on this unresolved question without success Inline CSS background:url() not working in Jinja2 template
Any help about this ?