Class Specialization(models.Model):
spec_name = models.CharField(max_length=200)
Class StudentGroup(models.Model):
sg_number = models.IntegerField()
sg_spec = models.ForeignKey(Specialization)
sg_count = models.IntegerField()
Class Schedule(models.Model):
schedule_date = models.DateField()
schedule_spec = models.ForeignKey(Specialization)
schedule_sg = models.ManyToMany(StudentGroup)
在schedule_sg中,我希望根据schedule_spec创建多个选择。怎么样?我尝试django-smart-choices,但它不支持ManyToMany feilds。