Mercurial > piecrust2
comparison piecrust/rendering.py @ 184:27d623a241c6
render: Don't always use a `.html` extension for layouts.
The rendering code now only looks for the extensions explicitely specified
by the template engine. To compensate, the Jinja engine specifies `.html`
as its last supported extension.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 04 Jan 2015 14:58:40 -0800 |
parents | fff195335d0a |
children | 65e6d72f3877 |
comparison
equal
deleted
inserted
replaced
183:fff195335d0a | 184:27d623a241c6 |
---|---|
197 default_exts = ['.' + e.lstrip('.') | 197 default_exts = ['.' + e.lstrip('.') |
198 for e in default_template_engine.EXTENSIONS] | 198 for e in default_template_engine.EXTENSIONS] |
199 full_names = [] | 199 full_names = [] |
200 for name in names: | 200 for name in names: |
201 if '.' not in name: | 201 if '.' not in name: |
202 full_names.append(name + '.html') | |
203 for ext in default_exts: | 202 for ext in default_exts: |
204 full_names.append(name + ext) | 203 full_names.append(name + ext) |
205 else: | 204 else: |
206 full_names.append(name) | 205 full_names.append(name) |
207 | 206 |