Python Tornado URL正则表达式模式

Python Tornado URL正则表达式模式,python,regex,paypal,tornado,Python,Regex,Paypal,Tornado,当paypal使用return\uURL返回到我选择的HTML页面时,我得到了一个405:Method不允许 我想这是因为我的返回的url是:'localhost:8000/ty',下面是: app=tornado.web.Application( handlers=[(r'/', IndexHandler),(r'/ty', ThankYouHandler)], db=db, template_path=os.path.join(os.path.dirname(__f

当paypal使用
return\uURL
返回到我选择的HTML页面时,我得到了一个405:Method不允许

我想这是因为我的返回的url是:'localhost:8000/ty',下面是:

app=tornado.web.Application(
    handlers=[(r'/', IndexHandler),(r'/ty', ThankYouHandler)], 
    db=db,
    template_path=os.path.join(os.path.dirname(__file__), "templates"),
    static_path=os.path.join(os.path.dirname(__file__), "static"),
    #debug=True                        
)
但是,收到的url路径为:127.0.0.1:8000/ty?token=EC-9YD54584BW887725V&PayerID=QQGSRNHDACTLJ

因此,为了让我的处理程序返回到该页面而不出现405错误,我需要将正则表达式添加到
/ty
处理程序中,以说明url路径


那么,如何在处理程序中处理regex呢?

当请求中使用的HTTP谓词未被Tornado处理时,将返回
405:Method not allowed
错误。这意味着,例如,您收到了一个HTTPPOST请求,但您的处理程序只定义了一个
get
方法。您需要确定PayPal正在使用哪个动词,并将该动词的处理程序添加到您的
RequestHandler

您好……是的,我在我的
处理程序中有一篇帖子,PayPal将此作为GET发回。我将尝试向处理程序添加一个GET作为
def GET(self):
我以前确实尝试过,但我没有被重定向到PayPal,而是登录到返回url,该url现在全部为空。