def jsonpify(func, *args, **kwargs):
"""A decorator that reformats the output as JSON; or, if the
*callback* parameter is specified (in the HTTP request), as JSONP.
Very much modelled after pylons.decorators.jsonify .
"""
data = func(*args, **kwargs)
return to_jsonp(data)
评论列表
文章目录