forked from github/pelican
Binds the summary property to the current instance
An unbound property will just return itself instead of calling the intended method.
This commit is contained in:
parent
8d6de4ec59
commit
f9123a4cc6
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue