def keywords_matched(self): content = html2text(self.details_raw) + " " + escape(self.summary) keywords_raw = Config.objects.get(key="keywords").value keywords = [keyword.strip() for keyword in keywords_raw.split(u",")] does_match, content, keywords_matched = matches(keywords, content) return keywords_matched
def details_text_highlighted(self): content = html2text(self.details_raw) keywords_raw = Config.objects.get(key="keywords").value keywords = [keyword.strip() for keyword in keywords_raw.split(u",")] does_match, content, keywords_matched = matches(keywords, content) return content