Commit 50fde102 authored by Jim Fulton's avatar Jim Fulton

Changed HTMLFile to use method protocol rather than acquisition

protocol.
parent 3fdf935f
"""Global definitions"""
__version__='$Revision: 1.10 $'[11:-2]
__version__='$Revision: 1.11 $'[11:-2]
import sys, os
from string import atof, rfind
......@@ -22,7 +22,7 @@ except:
from SingleThreadedTransaction import PickleDictionary, Persistent
import DocumentTemplate
import DocumentTemplate, MethodObject
class HTML(DocumentTemplate.HTML,Persistent,):
"Persistent HTML Document Templates"
......@@ -30,9 +30,14 @@ class HTML(DocumentTemplate.HTML,Persistent,):
class HTMLDefault(DocumentTemplate.HTMLDefault,Persistent,):
"Persistent Default HTML Document Templates"
class HTMLFile(DocumentTemplate.HTMLFile,Persistent,):
class HTMLFile(DocumentTemplate.HTMLFile,MethodObject.Method,):
"Persistent HTML Document Templates read from files"
class func_code: pass
func_code=func_code()
func_code.co_varnames='trueself', 'self', 'REQUEST'
func_code.co_argcount=3
def __init__(self,name,_prefix=None, **kw):
if _prefix is None: _prefix=SOFTWARE_HOME+'/lib/python'
elif type(_prefix) is not type(''): _prefix=package_home(_prefix)
......@@ -40,6 +45,10 @@ class HTMLFile(DocumentTemplate.HTMLFile,Persistent,):
args=(self, '%s/%s.dtml' % (_prefix,name))
apply(HTMLFile.inheritedAttribute('__init__'),args,kw)
def __call__(self, *args, **kw):
return apply(HTMLFile.inheritedAttribute('__call__'),
(self,)+args[1:],kw)
data_dir = CUSTOMER_HOME+'/var'
BobobaseName = '%s/Data.bbb' % data_dir
......@@ -64,6 +73,10 @@ else:
# Log
#
# $Log: Globals.py,v $
# Revision 1.11 1997/12/23 15:08:20 jim
# Changed HTMLFile to use method protocol rather than acquisition
# protocol.
#
# Revision 1.10 1997/12/17 16:36:50 jim
# Changed HTML file to support passing in globals()
#
......
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