answer_count = Answer.objects.filter(deleted=None, parent__in=questions).count()
answer_description = _("answers")
-
+
return {
"questions" : questions,
"questions_count" : questions.count(),
"answer_description": answer_description,
"base_path" : base_path,
"page_title" : page_title,
+ "tab" : "questions",
}
if question.deleted and not request.user.can_view_deleted_post(question):
raise Http404
- answer_form = AnswerForm(question)
+ if request.POST:
+ answer_form = AnswerForm(question, request.POST)
+ else:
+ answer_form = AnswerForm(question)
+
answers = request.user.get_visible_answers(question)
if answers is not None: