Django API 自定义状态码
2021-01-22 18:12
标签:ase color one __init__ api django djang token nbsp Django API 自定义状态码 标签:ase color one __init__ api django djang token nbsp 原文地址:https://www.cnblogs.com/Rivend/p/12077808.htmlclass BaseResponse(object):
def __init__(self):
self.code = 1000
self.data = None
self.error = None
@property
def dict(self):
return self.__dict__
class TokenResponse(BaseResponse):
def __init__(self):
super(BaseResponse).__init__()
self.code = 1000
self.token = None
class PricePolicyIncalid(Exception):
def __init__(self, msg):
self.msg = msg
上一篇:c# NPOI aspx导出数据
下一篇:Instrument API介绍