Django - Output form question|options [closed]

help please, I need to make a questionnaire (question and answer choices) Made a simple linked model:

class Questions_set(models.Model):
    title = models.CharField(max_length=500, verbose_name='Вопрос')

    def __str__(self):
        return self.title

    class Meta:
        verbose_name = 'Вопросы'
        verbose_name_plural = 'Вопрос'


class Answers_set(models.Model):
    title = models.CharField(max_length=500, verbose_name='Вопрос')
    correct = models.BooleanField(verbose_name='Правильный ответ')
    key_questions_set = models.ForeignKey(Questions_set, on_delete=models.CASCADE, related_name='question')

Filled in the tables. How to display in a template question and answer options to it in the form or it is not through a form to solve? Thank you

Вернуться на верх