def questions_by_tag(tag): return render_template('index.html', title = 'Questions tagged with "%s"' % tag, questions = Question.objects(tags__contains=tag))
def unanswered_questions(): return render_template('index.html', questions = Question.objects(answers__size = 0), title = 'Unanswered Questions')