一.多对多的正反向查询 class Class(models.Model): name = models.CharField(max_length=32,verbose_name="班级名") course = models.CharField(verbose_name="课程",max_length=32) def __str__(self): return self.name class Teacher(models.Model): name = models.…
一.多对多的正反向查询 class Class(models.Model): name = models.CharField(max_length=32,verbose_name="班级名") course = models.CharField(verbose_name="课程",max_length=32) def __str__(self): return self.name class Teacher(models.Model): name = models.…