I have a django model,
class MyModel(models.Model)
qty = model.IntegerField()
where I want to set constraint for qty
something like this, >0 or <0,i.e the qty
can be negative or positive but can not be 0.
Is there any straight forward way to do this in Django?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…