codes.py 1019 B

12345678910111213141516171819202122232425262728
  1. # coding:utf-8
  2. # author:ila
  3. normal_code = 0 # 正常
  4. redirect_code = 301 # 跳转
  5. temporary_redirect_code = 302 # 暂时跳转
  6. empty_param_code = 10001 # 请求参数为空或错误
  7. validate_param_code = 10002 # 请求参数不规范
  8. is_not_json_code = 10003 # 数据格式不是json
  9. other_code = 10020 # 其它错误
  10. crud_error_code = 10021 # 数据库操作失败
  11. header_error_code = 10023 # 头部错误
  12. captcha_error_code = 10024 # 验证码错误
  13. id_exist_code = 10025 # id或用户名已存在
  14. id_notexist_code = 10026 # id或用户名不存在
  15. username_error_code = 10027 # 用户名错误
  16. password_error_code = 10028 # 密码错误
  17. file_notexist_code = 10029 # 上传文件不存在
  18. code_expired_code = 10030 # 验证码等错误
  19. token_error_code = 20001 # token错误
  20. token_expired_code = 20002 # token错误
  21. non_authorized_code = 20003 # 无权限
  22. system_error_code = 40001 # 系统级错误
  23. request_expired_code = 40002 # 请求已过期
  24. repeated_request_code = 40003 # 重复请求