| 23 | |
| 24 | |
| 25 | class Result(JsonResponse): |
| 26 | charset = 'utf-8' |
| 27 | """ |
| 28 | 接口统一返回对象 |
| 29 | """ |
| 30 | |
| 31 | def __init__(self, code=200, message=_('Success'), data=None, response_status=status.HTTP_200_OK, **kwargs): |
| 32 | back_info_dict = {"code": code, "message": message, 'data': data} |
| 33 | super().__init__(data=back_info_dict, status=response_status, **kwargs) |
| 34 | |
| 35 | |
| 36 | def success(data, **kwargs): |
no outgoing calls
no test coverage detected