django unique field

前端 未结 3 2013
误落风尘
误落风尘 2021-01-18 09:07

is there another REGEX way (or another way) to ensure that a model class field would be unique? (it is not a key, or at least not declared as a key, is shoulb be a simple C

3条回答
  •  野的像风
    2021-01-18 09:42

    The normal way to make a single field unique is to use the unique argument to the field constructor.

提交回复
热议问题