@require_POST
@login_required
def watch_thread(request, document_slug, thread_id):
 doc = get_document(document_slug, request)
 thread = get_object_or_404(Thread, pk=thread_id, document=doc)
 if (request.POST.get('watch') == 'yes'):
  NewPostEvent.notify(request.user, thread)
  statsd.incr('kbforums.watches.thread')
 else:
  NewPostEvent.stop_notifying(request.user, thread)
 return HttpResponseRedirect(reverse('wiki.discuss.posts', args=[document_slug, thread_id]))

@ require_POST @ login_required def watch_thread ( request , document_slug , thread_id ) : doc = get_document ( document_slug , request ) thread = get_object_or_404 ( Thread , pk = thread_id , document = doc ) if ( request . POST . get ( 'watch' ) == 'yes' ) : NewPostEvent . notify ( request . user , thread ) statsd . incr ( 'kbforums.watches.thread' ) else : NewPostEvent . stop_notifying ( request . user , thread ) return HttpResponseRedirect ( reverse ( 'wiki.discuss.posts' , args = [ document_slug , thread_id ] ) )
watch/unwatch a thread .