开发者

Broken link images in python google app engine

开发者 https://www.devze.com 2023-02-06 05:17 出处:网络
Hi I\'ve tried many times to make an image link work using python/google app engine but it still shows a broken link.

Hi I've tried many times to make an image link work using python/google app engine but it still shows a broken link.

i've the folder images in my root folder containing the images i want.

my app.yaml file:

handlers:

    - url: /.*
      script: hellow开发者_运维百科orld.py

    - url: /images
      static_dir: images 

my index.html:

img src="images/_image01.gif" 


Handlers are matching in order. /.* will match any URL, so your /images handler will never be matched. Reverse the order of them, and always put a /.* handler last in app.yaml.


I think you are missing the '/' at the beginning of the static path in your html file. Try:

img src="/images/_image01.gif" 
0

精彩评论

暂无评论...
验证码 换一张
取 消