Answers for "create django model when field is added to a different model"

0

create django model field based on another field

class Product(models.Model):
    fields here     

    def save(self, *args, **kwargs):
        self.tags = self.category + '' + self.subcategory
        super(Product, self).save(*args, **kwargs)
Posted by: Guest on March-15-2021

Code answers related to "create django model when field is added to a different model"

Python Answers by Framework

Browse Popular Code Answers by Language