# 主表
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'