[Python] I intend to exempt 0 as a valid value in a positive integer field in django

Discussão em 'Python' iniciado por Stack, Maio 13, 2025.

  1. Stack

    Stack Membro Participativo

    class Sales(models.Model):
    customer = models.ForeignKey(Customer, null=True, on_delete= models.SET_NULL)
    quantity = models.PositiveIntegerField(default=0)
    goods_Pending = models.BooleanField()

    1. I would like to exempt 0 as a valid response in the Positive Integer Field

    Continue reading...

Compartilhe esta Página