Mercurial > piecrust2
comparison piecrust/app.py @ 478:5ee62af2a4e3
themes: Proper template path fixup for the theme configuration.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 20 Jul 2015 22:22:38 -0700 |
parents | 456db44dcc53 |
children | 3b6cbadd0c64 |
comparison
equal
deleted
inserted
replaced
477:01f514e9e47a | 478:5ee62af2a4e3 |
---|---|
441 tplc = sitec.get('templates_dirs') | 441 tplc = sitec.get('templates_dirs') |
442 if tplc is None: | 442 if tplc is None: |
443 return | 443 return |
444 if isinstance(tplc, str): | 444 if isinstance(tplc, str): |
445 tplc = [tplc] | 445 tplc = [tplc] |
446 sitec['templates_dirs'] = list(filter(tplc, | 446 sitec['templates_dirs'] = list( |
447 lambda p: os.path.join(self.theme_dir, p))) | 447 map( |
448 lambda p: os.path.join(self.theme_dir, p), | |
449 tplc)) | |
450 | |
448 config.fixups.append(_fixupThemeTemplatesDir) | 451 config.fixups.append(_fixupThemeTemplatesDir) |
449 | 452 |
450 # We'll also need to flag all page sources as coming from | 453 # We'll also need to flag all page sources as coming from |
451 # the theme. | 454 # the theme. |
452 def _fixupThemeSources(index, config): | 455 def _fixupThemeSources(index, config): |