Python 未使用URL参数加载静态文件
我遇到了一个奇怪的问题。我的静态文件似乎正在为整个站点加载,除非我将参数传递到URL路由中。例如 静态文件加载:Python 未使用URL参数加载静态文件,python,google-app-engine,Python,Google App Engine,我遇到了一个奇怪的问题。我的静态文件似乎正在为整个站点加载,除非我将参数传递到URL路由中。例如 静态文件加载: ('/profile', Profile) class Profile(MainHandler): def get(self): self.render('profile.html') 静态文件不加载: ('/profile/(\d+)', Profile) class Profile(MainHandler): def get(self, us
('/profile', Profile)
class Profile(MainHandler):
def get(self):
self.render('profile.html')
静态文件不加载:
('/profile/(\d+)', Profile)
class Profile(MainHandler):
def get(self, user_id):
self.render('profile.html')
有人知道为什么会这样吗?
profile.html
在两次调用中保持不变。静态服务路由在app.yaml
文件中是什么样子的?在profile.html
中发布一小部分相关内容,您可能正在使用相对路径,因此在/profile/static/img.png
上进行查找,而不是/static/img.png
。