def jsonify_resource(resource):
indent = None
if current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] \
and not request.is_xhr:
indent = 2
return current_app.response_class(json.dumps(resource, indent=indent),
mimetype='application/json')
评论列表
文章目录