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
7ce38986
Commit
7ce38986
authored
Oct 28, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed to not call document templates if not calling other functions.
parent
2732042e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
lib/python/DocumentTemplate/pDocumentTemplate.py
lib/python/DocumentTemplate/pDocumentTemplate.py
+12
-8
No files found.
lib/python/DocumentTemplate/pDocumentTemplate.py
View file @
7ce38986
...
...
@@ -58,8 +58,8 @@
__doc__
=
'''Python implementations of document template some features
$Id: pDocumentTemplate.py,v 1.
3 1997/10/27 17:42:07
jim Exp $'''
__version__
=
'$Revision: 1.
3
$'
[
11
:
-
2
]
$Id: pDocumentTemplate.py,v 1.
4 1997/10/28 21:52:06
jim Exp $'''
__version__
=
'$Revision: 1.
4
$'
[
11
:
-
2
]
import
regex
,
string
...
...
@@ -148,12 +148,13 @@ class TemplateDict:
def
__getitem__
(
self
,
key
,
call
=
1
):
v
=
self
.
dicts
[
key
]
try
:
isDocTemp
=
v
.
isDocTemp
except
:
isDocTemp
=
None
if
isDocTemp
:
v
=
v
(
None
,
self
)
elif
call
:
try
:
v
=
v
()
except
(
AttributeError
,
TypeError
):
pass
if
call
:
try
:
isDocTemp
=
v
.
isDocTemp
except
:
isDocTemp
=
None
if
isDocTemp
:
v
=
v
(
None
,
self
)
else
:
try
:
v
=
v
()
except
(
AttributeError
,
TypeError
):
pass
return
v
get
=
__getitem__
...
...
@@ -171,6 +172,9 @@ def render_blocks(self, md):
##############################################################################
#
# $Log: pDocumentTemplate.py,v $
# Revision 1.4 1997/10/28 21:52:06 jim
# Changed to not call document templates if not calling other functions.
#
# Revision 1.3 1997/10/27 17:42:07 jim
# Removed old validation machinery.
#
...
...
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