Commit 7ce38986 authored by Jim Fulton's avatar Jim Fulton

Changed to not call document templates if not calling other functions.

parent 2732042e
......@@ -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,10 +148,11 @@ class TemplateDict:
def __getitem__(self,key,call=1):
v=self.dicts[key]
if call:
try: isDocTemp=v.isDocTemp
except: isDocTemp=None
if isDocTemp: v=v(None,self)
elif call:
else:
try: v=v()
except (AttributeError,TypeError): pass
return v
......@@ -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.
#
......
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