Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #django #model #field #based #field
ADD COMMENT
Topic
Name
8+7 =