class Question(models.Model):
answer_choices = models.ManyToManyField(Answers)
class Meta:
abstract = True
class HTMLQuestion(Question):
question = models.fields.TextField()
class TextQuestion(Question):
question = models.fields.TextField()
class Quiz(models.Model):
questions = models.ManyToManyField(Question)
The last line doesn't work. I can't run python manage.py makemigrations without the error "Field defines a relation with model 'Question', which is either not installed, or is abstract."
Is there a way to have a list of Question subclassed instances without having it be of type "Question"? I want to have both types HTMLQuestion and TextQuestions to be in the Quiz.