def matches_post(self, post): if post.author != self.mark: return False if not self.active: return False # Remove quoted blocks because they don't count. content = iss_utils.get_closure_bbc_parser().format(post.content) return self.phrase.lower() in content.lower()
def quote_content(self): parser = utils.get_closure_bbc_parser() body = parser.format(self.content) template = '[quote author=%s]\n%s\n[/quote]' return template % (self.sender.username, body)
def quote_content(self): parser = utils.get_closure_bbc_parser() body = parser.format(self.content) template = '[quote pk=%d author="%s"]\n%s\n[/quote]' return template % (self.pk, self.author.username, body)
def setUp2(self): self.cparser = utils.get_closure_bbc_parser()