@register.tag
def entry_mark_as_spam(parser, token):
  if not settings.MARK_AS_SPAM_ENABLED:
    return django.template.defaulttags.CommentNode()
  bits = list(token.split_contents())
  is_admin = None
  if len(bits) != 3:
    raise template.TemplateSyntaxError, "%r takes two arguments" % bits[0]
  return EntryActionNode(bits[1], bits[2], is_admin, is_not_actor,
                         'entry_mark_as_spam', 'confirm-spam', 'Mark as spam')
Adds a Mark as spam link for a post or comment.
dataset/ETHPy150Open CollabQ/CollabQ/common/templatetags/entry.py/entry_mark_as_spam