Beispiel #1
0
def add_answer(request):
    question_id=request.POST["questionid"]
    content=request.POST["content"]
    answer=Answer(user=request.user,question_id=question_id,content=content)
    answer.submit_answer(request.user)
    html_str=render_to_string('answerlist.html',{'answers_list':[answer]})
    return HttpResponse(html_str)