@login_required
@require_POST
def answer_preview_async(request):
 statsd.incr('questions.preview')
 answer = Answer(creator=request.user, content=request.POST.get('content', ''))
 template = 'questions/includes/answer_preview.html'
 return render(request, template, {'answer_preview': answer})

@ login_required @ require_POST def answer_preview_async ( request ) : statsd . incr ( 'questions.preview' ) answer = Answer ( creator = request . user , content = request . POST . get ( 'content' , '' ) ) template = 'questions/includes/answer_preview.html' return render ( request , template , { 'answer_preview' : answer } )
create an html fragment preview of the posted wiki syntax .