[Fixed]-Can't do migrations – … has no field named 'questions'

1👍

So the matter is the following one:

questions = random.sample(self.quiz.questions,self.max_questions)

self.quiz go there :

quiz = models.OneToOneField(LanguageQuiz)

and quiz.questions go there :

class LanguageQuiz(models.Model):
    name = models.CharField(max_length=40)
    language = models.OneToOneField(sfl_models.Language)

the matter is questions doesn’t exist in LanguageQuiz.

👤Gaetan

Leave a comment