Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
407 views
in Technique[技术] by (71.8m points)

jquery - Static files are missing

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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...