型号:models.py
class enroll(models.Model):
classroom_id = models.ForeignKey(classroom ,on_delete=models.CASCADE)
student_id= models.ForeignKey(User.groups.filter(name='student'),on_delete=models.CASCADE)here
错误
**student_id= models.ForeignKey(User.groups.filter(name='student'),on_delete=models.CASCADE)
AttributeError: 'ManyToManyDescriptor' object has no attribute 'filter**