@require_POST
@login_required
@permitted
def un_pin_thread(request, course_id, thread_id):
 course_key = CourseKey.from_string(course_id)
 user = cc.User.from_django_user(request.user)
 thread = cc.Thread.find(thread_id)
 thread.un_pin(user, thread_id)
 return JsonResponse(prepare_content(thread.to_dict(), course_key))

@ require_POST @ login_required @ permitted def un_pin_thread ( request , course_id , thread_id ) : course_key = CourseKey . from_string ( course_id ) user = cc . User . from_django_user ( request . user ) thread = cc . Thread . find ( thread_id ) thread . un_pin ( user , thread_id ) return JsonResponse ( prepare_content ( thread . to_dict ( ) , course_key ) )
given a course id and thread id .