summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Bicking <ianb@colorstudy.com>2009-12-31 03:21:10 -0600
committerIan Bicking <ianb@colorstudy.com>2009-12-31 03:21:10 -0600
commit6f90b846e02c3a6ae699b04d52ff7eb54ffeb873 (patch)
tree775801a99b7b7eefd1814695cabdad9b0e1d34c6
parent9085fd8609186b0e3137487f43d90dca37c7c9eb (diff)
downloadtempita-6f90b846e02c3a6ae699b04d52ff7eb54ffeb873.tar.gz
fix file-relative template names
-rw-r--r--docs/index.txt5
-rw-r--r--tempita/__init__.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/docs/index.txt b/docs/index.txt
index b0ec1e2..9c81da9 100644
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -473,6 +473,11 @@ Still To Do
News
====
+hg tip
+------
+
+* Fixed bug where file-relative filenames wouldn't work well.
+
0.4
---
diff --git a/tempita/__init__.py b/tempita/__init__.py
index c4c0da2..ebb624d 100644
--- a/tempita/__init__.py
+++ b/tempita/__init__.py
@@ -70,7 +70,7 @@ class _TemplateBreak(Exception):
pass
def get_file_template(name, from_template):
- path = os.path.join(from_template.name, name)
+ path = os.path.join(os.path.dirname(from_template.name), name)
return from_template.__class__.from_filename(
path, namespace=from_template.namespace,
get_template=from_template.get_template)