个人工具 用于 django 开发
Project description
Django Json Tools
# http_response_json_models(ser, data, code, msg)
# 栗子:
class get_user_info(APIView):
user = User.object.get(pk=1)
return http_response_json_models(UserSerializer, user, 1, '查询用户信息成功')
# {'code':1, msg: '查询用户信息成功', data: {'id':1, 'username': 'ingrun'} }
:::
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.