How to Solve NameError: name 'Question' is not defined -- .models
Solution: Import the 'Question' module
To Solve the error, add the following line to the top of your code.
from .models import Question
For more information:
Python .models Question