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