Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/304.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 未使用URL参数加载静态文件_Python_Google App Engine - Fatal编程技术网

Python 未使用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

我遇到了一个奇怪的问题。我的静态文件似乎正在为整个站点加载,除非我将参数传递到URL路由中。例如

静态文件加载:

('/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