Reputation: 20419
I have the following folders structure:
project-folder
- templates
- css
vk.css
index.html
app.yaml
script.py
I would like to be able:
script.py
as templates/index.html
)In both cases vk.css
should be used. How should I define that at app.yaml
and at index.html
? Url is http://localhost:8080/something/
.
I've made it working with GAE, index.html
:
<link type="text/css" href="/css/vk.css" rel="stylesheet" />
app.yaml
:
- url: /css/
static_dir: templates/css
But it doesn't work locally.
Upvotes: 0
Views: 178
Reputation: 101149
If you want your browser to be able to render the template directly off the filesystem, you can't use site-relative URLs (eg, ones that begin with a /
) - when reading off your filesystem, site relative URLs are relative to your filesystem root. Instead, use relative urls (eg, ../css/vk.css
), and make sure that the filesystem structure matches your URL structure.
Upvotes: 1