Esempio n. 1
0
 def summary_highlighted(self):
     content = 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 content
Esempio n. 2
0
 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
Esempio n. 3
0
 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