tools (common/data_objects): comments items can now be chained to their parent
This commit is contained in:
parent
8f7e167dea
commit
affbd97593
1 changed files with 11 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ class BlogItem(object):
|
|||
self._tags = None
|
||||
self._groups = None
|
||||
self._comments = None
|
||||
self._comments_items_list = None
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
|
|
@ -114,6 +115,16 @@ class BlogItem(object):
|
|||
def comments_node(self):
|
||||
return self.mb_data.get(u'comments_node')
|
||||
|
||||
@property
|
||||
def comments_items_list(self):
|
||||
return [] if self._comments_items_list is None else self._comments_items_list
|
||||
|
||||
def appendCommentsItems(self, items):
|
||||
"""append comments items to self.comments_items"""
|
||||
if self._comments_items_list is None:
|
||||
self._comments_items_list = []
|
||||
self._comments_items_list.append(items)
|
||||
|
||||
|
||||
class BlogItems(object):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue