summaryrefslogtreecommitdiffstats
path: root/nikola/jinja_templates.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2012-12-12 20:15:48 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2012-12-12 20:15:48 -0300
commit0f2c04e70a0ffdd0892d6970cafbcd952d221db5 (patch)
treed36f7747c4b9cb5c5e00cae5b137d22214b1c7be /nikola/jinja_templates.py
parentca1f5a392261a7c6b82b5ac1015427605909d8c9 (diff)
Imported Upstream version 5upstream/5
Diffstat (limited to 'nikola/jinja_templates.py')
-rw-r--r--nikola/jinja_templates.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/nikola/jinja_templates.py b/nikola/jinja_templates.py
deleted file mode 100644
index f55465f..0000000
--- a/nikola/jinja_templates.py
+++ /dev/null
@@ -1,37 +0,0 @@
-########################################
-# Jinja template handlers
-########################################
-
-import os
-
-import jinja2
-
-lookup = None
-cache = {}
-
-
-def get_template_lookup(directories):
- return jinja2.Environment(loader=jinja2.FileSystemLoader(
- directories,
- encoding='utf-8',
- ))
-
-
-def render_template(template_name, output_name, context, global_context):
- template = lookup.get_template(template_name)
- local_context = {}
- local_context.update(global_context)
- local_context.update(context)
- output = template.render(**local_context)
- if output_name is not None:
- try:
- os.makedirs(os.path.dirname(output_name))
- except:
- pass
- with open(output_name, 'w+') as output:
- output.write(output.encode('utf8'))
- return output
-
-
-def template_deps(template_name):
- return []