Mercurial > piecrust2
comparison piecrust/sources/default.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 |
---|---|
29 | 29 |
30 def _createItemMetadata(self, path): | 30 def _createItemMetadata(self, path): |
31 return self._doCreateItemMetadata(path) | 31 return self._doCreateItemMetadata(path) |
32 | 32 |
33 def _finalizeContent(self, parent_group, items, groups): | 33 def _finalizeContent(self, parent_group, items, groups): |
34 SimpleAssetsSubDirMixin._onFinalizeContent( | 34 SimpleAssetsSubDirMixin._removeAssetGroups(groups) |
35 self, parent_group, items, groups) | |
36 | 35 |
37 def _doCreateItemMetadata(self, path): | 36 def _doCreateItemMetadata(self, path): |
38 slug = self._makeSlug(path) | 37 slug = self._makeSlug(path) |
39 metadata = { | 38 metadata = { |
40 'route_params': { | 39 'route_params': { |
60 slug = '' | 59 slug = '' |
61 return slug | 60 return slug |
62 | 61 |
63 def getRelatedContents(self, item, relationship): | 62 def getRelatedContents(self, item, relationship): |
64 if relationship == REL_ASSETS: | 63 if relationship == REL_ASSETS: |
65 SimpleAssetsSubDirMixin._getRelatedAssetsContents(self, item) | 64 return SimpleAssetsSubDirMixin._getRelatedAssetsContents( |
66 raise NotImplementedError() | 65 self, item) |
66 return FSContentSource.getRelatedContents(self, item, relationship) | |
67 | 67 |
68 def getSupportedRouteParameters(self): | 68 def getSupportedRouteParameters(self): |
69 return [ | 69 return [ |
70 RouteParameter('slug', RouteParameter.TYPE_PATH)] | 70 RouteParameter('slug', RouteParameter.TYPE_PATH)] |
71 | 71 |