English 中文(简体)
谷歌应用引擎
原标题:Google App Engine CSS Problem

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


<<>strong>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.

当我使用时


<<>strong>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.

提前感谢。

最佳回答

为此:

- 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 .*

问题回答

暂无回答




相关问题
How to make logging.debug work on Appengine?

I m having a tough time getting the logging on Appengine working. the statement import logging is flagged as an unrecognized import in my PyDev Appengine project. I suspected that this was just an ...

gqlQuery returns object, want list of keys

Is there a way to convert the GqlQuery object to an array of keys, or is there a way to force the query to return an array of keys? For example: items = db.GqlQuery("SELECT __key__ FROM Items") ...

Integrating Google AppEngine with a Thick Client

I want to make a multi-user client-server solution with Java Swing thick client as a front-end and Google AppEngine (Java one) as a back-end. The problem is that GAE provides only web-based forms for ...

sorl.thumbnail : thumbnail is not a valid tag library?

I am trying to install sorl.thumbnail but am getting the following error message: thumbnail is not a valid tag library: Could not load template library from django.templatetags.thumbnail, No module ...

热门标签