summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorianb <devnull@localhost>2008-12-17 01:23:33 +0000
committerianb <devnull@localhost>2008-12-17 01:23:33 +0000
commit495e8f6d6157f14cef0a6e2f84c3f2af9ac85a3b (patch)
tree6cb4a84cbc9ba1e3e45779c9bff7b0290c6f1c6a
parent9813044a905e27fa12316090b88b6b8afe28c9b9 (diff)
downloadtempita-495e8f6d6157f14cef0a6e2f84c3f2af9ac85a3b.tar.gz
Fix for python 2.5 and SystemError with parent templates. Small doc updates
-rw-r--r--docs/index.txt7
-rw-r--r--docs/license.txt5
-rw-r--r--docs/modules/tempita.txt2
-rw-r--r--tempita/__init__.py2
4 files changed, 13 insertions, 3 deletions
diff --git a/docs/index.txt b/docs/index.txt
index d47e8f0..a9b6814 100644
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -473,6 +473,13 @@ Still To Do
News
====
+svn trunk
+---------
+
+* Instead of defining ``__name__`` in template namespaces (which has special
+ rules, and must be a module name) the template name is put into
+ ``__template_name__``. This became important in Python 2.5.
+
0.3
---
diff --git a/docs/license.txt b/docs/license.txt
index 2e4ecaa..15a78bb 100644
--- a/docs/license.txt
+++ b/docs/license.txt
@@ -1,4 +1,7 @@
-Copyright (c) 2007 Ian Bicking and Contributors
+License
+-------
+
+Copyright (c) 2008 Ian Bicking and Contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/docs/modules/tempita.txt b/docs/modules/tempita.txt
index 4da916c..f21282b 100644
--- a/docs/modules/tempita.txt
+++ b/docs/modules/tempita.txt
@@ -17,7 +17,7 @@ HTML Templates
.. autoclass:: HTMLTemplate
.. autofunction sub_html
-.. autofunction:: html
+.. autoclass:: html
.. autofunction:: html_quote
.. autofunction:: url
.. autofunction:: attr
diff --git a/tempita/__init__.py b/tempita/__init__.py
index 4a3a771..b15031d 100644
--- a/tempita/__init__.py
+++ b/tempita/__init__.py
@@ -148,7 +148,7 @@ class Template(object):
% (args[0],))
kw = args[0]
ns = self.default_namespace.copy()
- ns['__name__'] = self.name
+ ns['__template_name__'] = self.name
ns.update(self.namespace)
ns.update(kw)
result, defs, inherit = self._interpret(ns)