What does Django's Exception class' “code” argument do?

后端 未结 0 735
别那么骄傲
别那么骄傲 2021-02-08 07:09

I read that:

Provide a descriptive error code to the constructor:

# Good
ValidationError(_(\'Invalid value\'), code=\'invalid\')

# Bad
Valida         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题