Support templates of any file extension.

This commit is contained in:
Mitchell Tannenbaum 2014-11-20 21:12:36 -05:00
commit fa89f262b7

View file

@ -86,9 +86,9 @@ class Generator(object):
"""
if name not in self._templates:
try:
self._templates[name] = self.env.get_template(name + '.html')
self._templates[name] = self.env.get_template(name)
except TemplateNotFound:
raise Exception('[templates] unable to load %s.html from %s'
raise Exception('[templates] unable to load %s from %s'
% (name, self._templates_path))
return self._templates[name]