1
0
Fork 0
forked from github/pelican

Revert "Relativize URLs in summary as we do for content"

This reverts commit 5a993de400.
This commit is contained in:
Massimo Santini 2011-10-04 07:31:21 +02:00
commit 8b36f90db9
2 changed files with 7 additions and 26 deletions

View file

@ -85,8 +85,8 @@ class Page(object):
self.locale_date = self.date.strftime(self.date_format.encode('ascii','xmlcharrefreplace')).decode('utf')
# manage summary
if not hasattr(self, '_summary'):
self._summary = property(lambda self: truncate_html_words(self.content, 50)).__get__(self, Page)
if not hasattr(self, 'summary'):
self.summary = property(lambda self: truncate_html_words(self.content, 50)).__get__(self, Page)
# manage status
if not hasattr(self, 'status'):
@ -106,15 +106,6 @@ class Page(object):
content = self._content
return content
@property
def summary(self):
if hasattr(self, "_get_summary"):
summary = self._get_summary()
else:
summary = self._summary
return summary
class Article(Page):
mandatory_properties = ('title', 'date', 'category')