How to Implement Multiple User Types with Django
class Student(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=True)
quizzes = models.ManyToManyField(Quiz, through=‘TakenQuiz’)
interests = models.ForeignKey(Subject, related_name=‘interested_students’, on_delete=models.CASCADE)

interests = forms.ModelChoiceField(
empty_label= None,

def save(self):
user = super().save(commit=False)
user.is_student = True
student = Student.objects.create(user=user)
return user

I am getting an error. I am giving the student option to pick one interest during the registration, through dropdown Select. I can see the interest on the registration page through this code above but getting an error.
Sincerely, Django has some issue or complex in some situation. Because I expect this to also work with DropDown fro student to pick a single interest. Thanks