Mercurial > piecrust2
comparison piecrust/plugins/builtin.py @ 185:139179dc7abd
render: Add support for a Mustache template engine.
Add unit tests for the new class.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 04 Jan 2015 14:59:12 -0800 |
parents | 6d23473fab41 |
children | d5b7c2a4ec9d |
comparison
equal
deleted
inserted
replaced
184:27d623a241c6 | 185:139179dc7abd |
---|---|
26 from piecrust.sources.posts import ( | 26 from piecrust.sources.posts import ( |
27 FlatPostsSource, ShallowPostsSource, HierarchyPostsSource) | 27 FlatPostsSource, ShallowPostsSource, HierarchyPostsSource) |
28 from piecrust.sources.autoconfig import AutoConfigSource | 28 from piecrust.sources.autoconfig import AutoConfigSource |
29 from piecrust.sources.prose import ProseSource | 29 from piecrust.sources.prose import ProseSource |
30 from piecrust.templating.jinjaengine import JinjaTemplateEngine | 30 from piecrust.templating.jinjaengine import JinjaTemplateEngine |
31 from piecrust.templating.pystacheengine import PystacheTemplateEngine | |
31 | 32 |
32 | 33 |
33 class BuiltInPlugin(PieCrustPlugin): | 34 class BuiltInPlugin(PieCrustPlugin): |
34 def __init__(self): | 35 def __init__(self): |
35 super(BuiltInPlugin, self).__init__() | 36 super(BuiltInPlugin, self).__init__() |
71 IteratorDataProvider, | 72 IteratorDataProvider, |
72 BlogDataProvider] | 73 BlogDataProvider] |
73 | 74 |
74 def getTemplateEngines(self): | 75 def getTemplateEngines(self): |
75 return [ | 76 return [ |
76 JinjaTemplateEngine()] | 77 JinjaTemplateEngine(), |
78 PystacheTemplateEngine()] | |
77 | 79 |
78 def getFormatters(self): | 80 def getFormatters(self): |
79 return [ | 81 return [ |
80 MarkdownFormatter(), | 82 MarkdownFormatter(), |
81 SmartyPantsFormatter(), | 83 SmartyPantsFormatter(), |