Is there a way to pass "GENDER" attach it to QuestionFocus
and then get what's behind QuestionFocus.GENDER
? I could of course just pass QuestionFocus.GENDER
but it would make it longer than (maybe) necessary.
def get_answers(question_focus):
return Answer.objects.filter(
response_id__in=get_super_guests().values_list("id", flat=True),
question__focus=QuestionFocus.question_focus,
).order_by("-created")
context["genders"] = get_answers("GENDER")