python - How to use 2 ForeignKey filters one by one in 1 view - Django? -
hello , thank your answer: my taks: show article, show 3 questions (related article), show 3 answer each queston (related these questions). coomon test page. my models: class step(models.model): #main article title = models.charfield(max_length=200) description = models.charfield(max_length=200) annotation = models.textfield() main_text = models.textfield() def __str__(self): return self.title class question(models.model): #questios related article. step = models.foreignkey(step, on_delete=models.cascade) title = models.charfield(max_length=200, default = "pages") question_text = models.textfield() question_name = models.charfield(max_length=40, help_text="английские буквы", blank=true, null=true) class answer(models.model): #answers related questions question = models.foreignkey(question, on_delete=models.cascade) choice_text = models.textfield() votes = models.integerfield(default=0) answ...