2
votes


i have a big problem with images for my project with python (appspots.com).

How to configure the app.yaml for images? My Images are in the directory /css/images/xy.png

The log say:

INFO 2012-04-22 17:29:42,601 dev_appserver.py:2884] "GET /css/images/ui-bg_glass_75_e6e6e6_1x400.png HTTP/1.1" 404 -

My app.yaml (only handlers):

- url: /js
  static_dir: js

- url: /css/main.css 
  static_files: css/main.css
  upload: css/main.css 

- url: /css/jquery-ui-1.8.19.custom.css 
  static_files: css/jquery-ui-1.8.19.custom.css
  upload: css/jquery-ui-1.8.19.custom.css 

- url: .*
  script: main.py

- url: /css/images/.*
  static_dir: css/images

I hope that you can help me :)

1

1 Answers

6
votes

The problem is that you have .* before /css/images./* and that pattern matches everything. Rearrange it like this:

- url: /js
  static_dir: js

- url: /css/main.css 
  static_files: css/main.css
  upload: css/main.css 

- url: /css/jquery-ui-1.8.19.custom.css 
  static_files: css/jquery-ui-1.8.19.custom.css
  upload: css/jquery-ui-1.8.19.custom.css 

- url: /css/images
  static_dir: css/images

- url: .*
  script: main.py

EDIT: Try removing the /.* from the end of the pattern, as illustrated above.