@require_GET
def activate_watch(request, watch_id, secret):
 watch = get_object_or_404(Watch, pk=watch_id)
 question = watch.content_object
 if ((watch.secret == secret) and isinstance(question, Question)):
  watch.activate().save()
  statsd.incr('questions.watches.activate')
 return render(request, 'questions/activate_watch.html', {'question': question, 'unsubscribe_url': reverse('questions.unsubscribe', args=[watch_id, secret]), 'is_active': watch.is_active})

@ require_GET def activate_watch ( request , watch_id , secret ) : watch = get_object_or_404 ( Watch , pk = watch_id ) question = watch . content_object if ( ( watch . secret == secret ) and isinstance ( question , Question ) ) : watch . activate ( ) . save ( ) statsd . incr ( 'questions.watches.activate' ) return render ( request , 'questions/activate_watch.html' , { 'question' : question , 'unsubscribe_url' : reverse ( 'questions.unsubscribe' , args = [ watch_id , secret ] ) , 'is_active' : watch . is_active } )
activate watching a question .