Answers for "django column to have duplicate of other"

0

django column to have duplicate of other

class Person(models.Model):
    amount = models.CharField(max_length=50,blank=True, null=True)
    amount_paid = models.CharField(max_length=60,default='5000', null=True)

    def save(self, *args, **kwargs):
       self.amount_paid = self.amount
       super().save(*args, **kwargs)
Posted by: Guest on March-18-2022

Code answers related to "django column to have duplicate of other"

Python Answers by Framework

Browse Popular Code Answers by Language