Así que estoy codificando una aplicación de prueba en django y quiero mostrar las preguntas individualmente y una vez que el usuario seleccione una respuesta y haga clic en Siguiente, se mostrará la siguiente pregunta.
Cómo puedo hacer esto
modelos.py:
class Question(models.Model): text = models.CharField(max_length=200) quiz = models.ForeignKey(Quiz, on_delete=models.CASCADE) created = models.DateTimeField(auto_now_add=True) def __str__(self): return str(self.text) def get_answers(self): ''' Get the set of all the answers to the questions ''' return self.answer_set.all() class Answer(models.Model): text = models.CharField(max_length=200) correct = models.BooleanField(default=False) question = models.ForeignKey(Question, on_delete=models.CASCADE) created = models.DateTimeField(auto_now_add=True) def __str__(self): return f"question: {self.question.text}, answer: {self.text}, correct: {self.correct}"