开发者

Google App Engine CSS Problem

开发者 https://www.devze.com 2023-02-08 07:25 出处:网络
I have a strange problem with css file in google app engine. If i use handlers: - url: /cms/.* script: cms.py

I have a strange problem with css file in google app engine.

If i use


handlers:

- url: /cms/.* script: cms.py

- url: /
  script: main.开发者_运维问答py

- url: /stylesheets
  static_dir: stylesheets

in my app.yaml file for http://localhost:8080/ it works fine.

But when i redirect it to another handler in main.py It gives such an error

Not found error: /login did not match any patterns in application configuration.

When I use this


handlers:

- url: /cms/.* script: cms.py

- url: .*
  script: main.py


- url: /stylesheets
  static_dir: stylesheets

whole logic works just fine ( no error occurs wherever I roam in the application) but no sign of css this time.

I hope you can help me.

Thanks in advance..


Try with this:

- url: /stylesheets
  static_dir: stylesheets

- url: /cms/.* 
  script: cms.py

- url: /.*
  script: main.py

Your first solution does not work with /login because using / you are getting just the root
Your second solution does not work because stylesheets cames after the catch all pattern .*

0

精彩评论

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