Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
ad3114d3
Commit
ad3114d3
authored
May 22, 2006
by
Philipp von Weitershausen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We also need a new read() method due to the call signature incompabilities.
parent
2def0533
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
lib/python/Products/PageTemplates/PageTemplate.py
lib/python/Products/PageTemplates/PageTemplate.py
+17
-1
No files found.
lib/python/Products/PageTemplates/PageTemplate.py
View file @
ad3114d3
...
...
@@ -17,7 +17,7 @@ $Id$
import
sys
import
ExtensionClass
import
zope.pagetemplate.pagetemplate
from
zope.pagetemplate.pagetemplate
import
PTRuntimeError
from
zope.pagetemplate.pagetemplate
import
_error_start
,
PTRuntimeError
from
zope.pagetemplate.pagetemplate
import
PageTemplateTracebackSupplement
from
zope.tales.expressions
import
SimpleModuleImporter
from
Products.PageTemplates.Expressions
import
getEngine
...
...
@@ -103,6 +103,22 @@ class PageTemplate(ExtensionClass.Base,
kwargs
[
'args'
]
=
args
return
self
.
pt_render
(
extra_context
=
{
'options'
:
kwargs
})
def
read
(
self
):
self
.
_cook_check
()
if
not
self
.
_v_errors
:
if
not
self
.
expand
:
return
self
.
_text
try
:
return
self
.
pt_render
(
source
=
True
)
except
:
return
(
'%s
\
n
Macro expansion failed
\
n
%s
\
n
-->
\
n
%s'
%
(
_error_start
,
"%s: %s"
%
sys
.
exc_info
()[:
2
],
self
.
_text
)
)
return
(
'%s
\
n
%s
\
n
-->
\
n
%s'
%
(
_error_start
,
'
\
n
'
.
join
(
self
.
_v_errors
),
self
.
_text
))
# convenience method for the ZMI which allows to explicitly
# specify the HTMLness of a template. The old Zope 2
# implementation had this as well, but arguably on the wrong class
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment