@require_POST
@login_required
@permitted
def vote_for_thread(request, course_id, thread_id, value):
 thread = cc.Thread.find(thread_id)
 result = _vote_or_unvote(request, course_id, thread, value)
 thread_voted.send(sender=None, user=request.user, post=thread)
 return result

@ require_POST @ login_required @ permitted def vote_for_thread ( request , course_id , thread_id , value ) : thread = cc . Thread . find ( thread_id ) result = _vote_or_unvote ( request , course_id , thread , value ) thread_voted . send ( sender = None , user = request . user , post = thread ) return result
given a course id and thread id vote for this thread ajax only .