2010-07-30 52 views

回答

2

一个相关的提示添加到@油的角度来看,瓶默认返回JSON的返回的字典:

@route('/resource.json') 
def resource_json(): 
    response = dict(
     data=('tuple', 'of', 'things')) 
return response 

http://bottle.paws.de/page/docs#output-casting

+0

添:你的链接断开:( – 2012-08-17 15:29:39