def mark_content_as_spam(user, by_user):
 for question in Question.objects.filter(creator=user):
  question.mark_as_spam(by_user)
 for answer in Answer.objects.filter(creator=user):
  answer.mark_as_spam(by_user)

def mark_content_as_spam ( user , by_user ) : for question in Question . objects . filter ( creator = user ) : question . mark_as_spam ( by_user ) for answer in Answer . objects . filter ( creator = user ) : answer . mark_as_spam ( by_user )
flag all the questions and answers of the user as spam .