有没有办法用params调用webpy(GET)视图(从另一个视图)?
提前致谢。
答案 0 :(得分:1)
import web
urls = (
'/(\d+)', 'index',
'/number', 'novo'
)
class index:
def GET(self, number):
return "Number: %i " % number
class number:
def GET(self):
get_index = index()
return get_index.GET(3)
app = web.application(urls, globals())
if __name__ == "__main__":
app.run()