@require_GET
def unsubscribe_watch(request, watch_id, secret):
 watch = get_object_or_404(Watch, pk=watch_id)
 question = watch.content_object
 success = False
 if ((watch.secret == secret) and isinstance(question, Question)):
  user_or_email = (watch.user or watch.email)
  QuestionReplyEvent.stop_notifying(user_or_email, question)
  QuestionSolvedEvent.stop_notifying(user_or_email, question)
  success = True
 return render(request, 'questions/unsubscribe_watch.html', {'question': question, 'success': success})

@ require_GET def unsubscribe_watch ( request , watch_id , secret ) : watch = get_object_or_404 ( Watch , pk = watch_id ) question = watch . content_object success = False if ( ( watch . secret == secret ) and isinstance ( question , Question ) ) : user_or_email = ( watch . user or watch . email ) QuestionReplyEvent . stop_notifying ( user_or_email , question ) QuestionSolvedEvent . stop_notifying ( user_or_email , question ) success = True return render ( request , 'questions/unsubscribe_watch.html' , { 'question' : question , 'success' : success } )
stop watching a question .