次のように竜巻のパスチェックを行いたい:
class MyRequestHandler(tornado.web.RequestHandler):
def initialize(self):
self.supported_path = ['path_a', 'path_b', 'path_c']
def get(self, action):
if action not in self.supported_path:
self.send_error(400)
def post(self, action):
if action not in self.supported_path:
self.send_error(400)
# not implemented
#def prepare(self):
# if action match the path
app = tornado.web.Application([
('^/main/(P<action>[^\/]?)/', MyRequestHandler),])
prepare
との両方ではなく、get
どうすればチェックインできpost
ますか?