Commit bb3c5d9f authored by Evan Simpson's avatar Evan Simpson

Merge fixes from 1.4.0 branch

parent 972a61c2
......@@ -4,20 +4,8 @@ Page Template changes
Change information for previous versions can be found in the
file HISTORY.txt.
Version 1.4.0
Features Added
- ZPTs are now cache-enabled
- Added property sheet to ZPT
Version 1.4.1
Bugs Fixed
- Expressions with embedded newlines were broken
- History comparison tried to expand macros
- Iterator exceptions weren't converted
- 'Unauthorized' exception couldn't be handled by on-error
- Tracebacks were often truncated.
......@@ -4,6 +4,24 @@ Page Template history
PageTemplates. Change information for the current release can be found
in the file CHANGES.txt.
Version 1.4.0
Features Added
- ZPTs are now cache-enabled
- Added property sheet to ZPT
Bugs Fixed
- Expressions with embedded newlines were broken
- History comparison tried to expand macros
- Iterator exceptions weren't converted
- 'Unauthorized' exception couldn't be handled by on-error
Version 1.3.3
Features Added
......
......@@ -87,7 +87,7 @@
HTML- and XML-based template objects using TAL, TALES, and METAL.
"""
__version__='$Revision: 1.13 $'[11:-2]
__version__='$Revision: 1.14 $'[11:-2]
import os, sys, traceback, pprint
from TAL.TALParser import TALParser
......@@ -105,7 +105,7 @@ class MacroCollection(Base):
def __of__(self, parent):
return parent._v_macros
class PageTemplate:
class PageTemplate(Base):
"Page Templates using TAL, TALES, and METAL"
content_type = 'text/html'
......
......@@ -87,7 +87,7 @@
An implementation of a generic TALES engine
"""
__version__='$Revision: 1.20 $'[11:-2]
__version__='$Revision: 1.21 $'[11:-2]
import re, sys, ZTUtils
from MultiMapping import MultiMapping
......@@ -294,6 +294,8 @@ class Context:
try:
v = expression(self)
if isinstance(v, Exception):
if hasattr(v, 'traceback'):
raise v, None, v.traceback
raise v
except self._nocatch:
raise
......
......@@ -87,7 +87,7 @@
Zope object encapsulating a Page Template.
"""
__version__='$Revision: 1.16 $'[11:-2]
__version__='$Revision: 1.17 $'[11:-2]
import os, AccessControl, Acquisition, sys
from Globals import DTMLFile, MessageDialog, package_home
......@@ -267,7 +267,7 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
result = self.pt_render(extra_context=bound_names)
except TALESError, err:
if err.type == 'Unauthorized':
raise err.type, err.value
raise err.type, err.value, err.traceback
raise
if keyset is not None:
# Store the result in the cache.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment