We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/Muxi-Studio/guisheng_be/blob/master/guisheng/app/api_1_0/everydaypic.py#L11 你这里的写法很lowlevel啊, 其实可以直接用现成的jsonify函数, 用Response对象封装不多见, 虽然也可以.
The text was updated successfully, but these errors were encountered:
其实可以这么做, jsonify只能处理字典, 似乎处理列表这些用Response封装是唯一办法了.
Sorry, something went wrong.
因为有些别的地方要处理列表,所以用不了jsonify,然后想了很久没想到别的方法...然后为了统一这里也这么写了。 @neo1218
@RoseOu 其实你可以写成装饰器,感觉这样更好 比如
@app.route('/) @admin_required @jsonify def function(): return [{......}]
No branches or pull requests
https://github.com/Muxi-Studio/guisheng_be/blob/master/guisheng/app/api_1_0/everydaypic.py#L11
你这里的写法很lowlevel啊, 其实可以直接用现成的jsonify函数, 用Response对象封装不多见, 虽然也可以.
The text was updated successfully, but these errors were encountered: