保存表单时,将其标记为可以在字段中保留为空白的pago并显示为False后,如何将False更改为0或任何其他值
Models.py
class MovRotativo(models.Model):
checkin = models.DateTimeField(default=timezone.now())
checkout = models.DateTimeField(null=True, blank=True)
email = models.EmailField(blank=False)
placa = models.CharField(max_length=8, blank=False)
modelo = models.CharField(max_length=15, blank=False)
valor_hora = models.DecimalField(
max_digits=5, decimal_places=2, null=False, blank=False)
pago = models.CharField(max_length=15, choices=PAGO_CHOICES)
chk = models.CharField(("Situação"), max_length=15,
choices=SAIDA_CHOICES, default='Não')