From 495e8f6d6157f14cef0a6e2f84c3f2af9ac85a3b Mon Sep 17 00:00:00 2001 From: ianb Date: Wed, 17 Dec 2008 01:23:33 +0000 Subject: Fix for python 2.5 and SystemError with parent templates. Small doc updates --- docs/index.txt | 7 +++++++ docs/license.txt | 5 ++++- docs/modules/tempita.txt | 2 +- tempita/__init__.py | 2 +- 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) -- cgit v1.2.1