@require_POST
@login_required
def watch_forum(request, forum_slug):
 forum = get_object_or_404(Forum, slug=forum_slug)
 if (not forum.allows_viewing_by(request.user)):
  raise Http404
 if (request.POST.get('watch') == 'yes'):
  NewThreadEvent.notify(request.user, forum)
  statsd.incr('forums.watches.forum')
 else:
  NewThreadEvent.stop_notifying(request.user, forum)
 return HttpResponseRedirect(reverse('forums.threads', args=[forum_slug]))

@ require_POST @ login_required def watch_forum ( request , forum_slug ) : forum = get_object_or_404 ( Forum , slug = forum_slug ) if ( not forum . allows_viewing_by ( request . user ) ) : raise Http404 if ( request . POST . get ( 'watch' ) == 'yes' ) : NewThreadEvent . notify ( request . user , forum ) statsd . incr ( 'forums.watches.forum' ) else : NewThreadEvent . stop_notifying ( request . user , forum ) return HttpResponseRedirect ( reverse ( 'forums.threads' , args = [ forum_slug ] ) )
watch/unwatch a forum .