diff --git a/hyde/template.py b/hyde/template.py index 85841b9..ae02d4a 100644 --- a/hyde/template.py +++ b/hyde/template.py @@ -7,8 +7,9 @@ from hyde.exceptions import HydeException import abc -from commando.util import getLoggerWithNullHandler +from commando.util import getLoggerWithNullHandler, load_python_object +DEFAULT_TEMPLATE = 'hyde.ext.templates.jinja.Jinja2Template' class HtmlWrap(object): """ @@ -159,7 +160,7 @@ class Template(object): """ Reads the configuration to find the appropriate template. """ - # TODO: Find the appropriate template environment - from hyde.ext.templates.jinja import Jinja2Template - template = Jinja2Template(site.sitepath) + template_object = site.config.get('template', DEFAULT_TEMPLATE) + template_cls = load_python_object(template_object) + template = template_cls(site.sitepath) return template