I have a question model:
class Question(models.Model):
....
and an answer model related to it:
class Answer(models.Model):
user = models.ForeignKey(User)
question = models.ForeignKey(Question, on_delete=models.CASCADE)
I want to filter out all the questions with no answers. How can I do that in the view?