mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fixes the bug re-introduced in 0b6896a. Thank to @mapio for noticing the problem :-)
This commit is contained in:
parent
4da387127e
commit
b9157df1a3
1 changed files with 12 additions and 0 deletions
|
|
@ -106,6 +106,18 @@ class Page(object):
|
||||||
content = self._content
|
content = self._content
|
||||||
return 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):
|
class Article(Page):
|
||||||
mandatory_properties = ('title', 'date', 'category')
|
mandatory_properties = ('title', 'date', 'category')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue