django custom table names and field names

AAA class (models.Model): 
    # the db_column Customization Customization column names in accordance with the rules of django 
    content_id = models.CharField (= 32 MAX_LENGTH, the db_column = 'content_id') 

    class Meta -: 
        # the db_column Customization Customization of the table according to django rule 
        db_table = 'aaa'

  

Guess you like

Origin www.cnblogs.com/ZKPython/p/11115312.html