From f9123a4cc646bda2a14552f57cb09478f7df7cbc Mon Sep 17 00:00:00 2001 From: Marcus Fredriksson Date: Wed, 9 Mar 2011 12:21:15 +0100 Subject: [PATCH] Binds the summary property to the current instance An unbound property will just return itself instead of calling the intended method. --- pelican/contents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/contents.py b/pelican/contents.py index 397b7fdb..7097e946 100644 --- a/pelican/contents.py +++ b/pelican/contents.py @@ -58,7 +58,7 @@ class Page(object): self.locale_date = self.date.strftime(self.date_format.encode('ascii','xmlcharrefreplace')).decode('utf') if not hasattr(self, 'summary'): - self.summary = property(lambda self: truncate_html_words(self.content, 50)) + self.summary = property(lambda self: truncate_html_words(self.content, 50)).__get__(self, Page) # store the settings ref. self._settings = settings