Mercurial > piecrust2
comparison piecrust/data/linker.py @ 862:fddaf43424e2
refactor: Get the page assets to work again in the server.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 08 Jun 2017 23:09:34 -0700 |
parents | 08e02c2a2a1a |
children | d9059257743c |
comparison
equal
deleted
inserted
replaced
861:d214918d4d2c | 862:fddaf43424e2 |
---|---|
1 import logging | 1 import logging |
2 from piecrust.data.paginationdata import PaginationData | 2 from piecrust.data.paginationdata import PaginationData |
3 from piecrust.sources.base import ( | 3 from piecrust.sources.base import ( |
4 REL_PARENT_GROUP, REL_LOGICAL_PARENT_ITEM, REL_LOGICAl_CHILD_GROUP) | 4 REL_LOGICAL_PARENT_ITEM, REL_LOGICAl_CHILD_GROUP) |
5 | 5 |
6 | 6 |
7 logger = logging.getLogger(__name__) | 7 logger = logging.getLogger(__name__) |
8 | 8 |
9 | 9 |
65 | 65 |
66 @property | 66 @property |
67 def siblings(self): | 67 def siblings(self): |
68 if self._siblings is None: | 68 if self._siblings is None: |
69 self._siblings = [] | 69 self._siblings = [] |
70 parent_group = self._source.getRelatedContents( | 70 parent_group = self._source.getParentGroup(self._content_item) |
71 self._content_item, REL_PARENT_GROUP) | |
72 for i in self._source.getContents(parent_group): | 71 for i in self._source.getContents(parent_group): |
73 if not i.is_group: | 72 if not i.is_group: |
74 ipage = self._app.getPage(self._source, i) | 73 ipage = self._app.getPage(self._source, i) |
75 self._siblings.append(PaginationData(ipage)) | 74 self._siblings.append(PaginationData(ipage)) |
76 return self._siblings | 75 return self._siblings |