摘要:
from bottle import (run, route, get, post, default_app, Bottle) @route('/', method='GET') @route('/index') def hello(): return 'hello, word!' """ bottle的动态route提供了五种默认的类型,即... 阅读全文
posted @ 2017-05-11 14:27
风起616
阅读(1989)
评论(0)
推荐(0)
摘要:
from bottle import (run, route, get, post, default_app, Bottle) """ 首先获得一个app对象,有两种方法,第一种是通过 default_app方法,另一种就是通过Bottle() """ app = default_app() # or via bottle.Bottle() app.co... 阅读全文
posted @ 2017-05-11 11:21
风起616
阅读(1552)
评论(0)
推荐(0)
摘要:
from bottle import (run, route, get, post, put, delete) # bottle中添加路由的两种方法 # 第一种,使用route装饰器,需要指定method(get, put, delete,delete), # 如果不指定默认为get 方法 @route('/', method='GET') def hello(): return "h... 阅读全文
posted @ 2017-05-11 10:30
风起616
阅读(2728)
评论(0)
推荐(0)

浙公网安备 33010602011771号