djangoclassmeta说明

class Person(models.Model):

  #db_column='age'  重新定义字段名为age

  p_name = models.CharField(max_length=16,unique=True)

       p_age = models.IntegerField(default=18,db_column='age')

  class Meta:

    db_table="people"  #重新定义表名为people

上班求生存,下班求发展
原文地址:https://www.cnblogs.com/ljf520hj/p/15721417.html