In my app there is a /static
folder which contains all the static resources needed by the app. Here is my handlers for the static resources:
- url: /static
static_dir: static
This works for files directly in /static
, but let's say I also have another folder containing jQuery:
static
|- jquery
| \- jquery.js
|
\- images
\- ...
When I try to reach [myapp].appspot.com/static/jquery/jquery.js
it would return a 404 and I have no idea why.
Also some of my files including .css
and .ttf
etc. are giving me a Could not guess mimtype
error. I have no idea how to solve that.
Edit
Added my (new) app.yaml. I don't have a dispatch.yaml.
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /static/pages_style
mime_type: text/css
static_dir: /static/pages_style
- url: /static/images/(.*\.(gif|png|jpg))$
static_files: static/images/\1
upload: static/images/.*\.(gif|png|jpg)$
- url: /static/bootstrap 3.3.5
static_dir: /static/bootstrap 3.3.5
- url: /static/jquery 2.1.4
static_dir: /static/jquery 2.1.4
- url: /.*
script: myapp.app
libraries:
- name: webapp2
version: latest
- name: jinja2
version: latest