标签:max auto str rac ted length abstract ase ble
# 主表
class Base(models.Model):
create_time = models.DateTimeField(auto_now_add=True) #创建时间
update_time = models.DateTimeField(auto_now=True) #更新时间
class Meta:
abstract = True #一定要写
class Stu(Base,models.Model):
name = models.CharField(max_length=32)
img = models.CharField(max_length=255)
duo = models.ManyToManyField(to=‘Kc‘,related_name=‘sss‘)#
class Meta:
db_table=‘stu‘
标签:max auto str rac ted length abstract ase ble
原文地址:https://www.cnblogs.com/pp8080/p/11828644.html