From b9157df1a3f30adf32d03003a42295dfc665fa4d Mon Sep 17 00:00:00 2001 From: Skami18 Date: Sat, 29 Oct 2011 12:57:15 +0200 Subject: [PATCH] Fixes the bug re-introduced in 0b6896a. Thank to @mapio for noticing the problem :-) --- pelican/contents.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pelican/contents.py b/pelican/contents.py index 08195c8c..ddcb37b6 100644 --- a/pelican/contents.py +++ b/pelican/contents.py @@ -106,6 +106,18 @@ class Page(object): content = self._content return content + def _get_summary(self): + """Returns the summary of an article, based on to the content""" + return truncate_html_words(self.content, 50) + + def _set_summary(self, summary): + """Dummy function""" + pass + + summary = property(_get_summary, _set_summary, \ + "Summary of the article. Based on the content. Can't be set") + + class Article(Page): mandatory_properties = ('title', 'date', 'category')