Commit 875c81dc authored by Jim Fulton's avatar Jim Fulton

Jim told Paul to do it

parent ff382ebc
"""Global definitions"""
__version__='$Revision: 1.4 $'[11:-2]
__version__='$Revision: 1.5 $'[11:-2]
try:
home=CUSTOMER_HOME, SOFTWARE_HOME, SOFTWARE_URL
CUSTOMER_HOME, SOFTWARE_HOME, SOFTWARE_URL = home
except:
CUSTOMER_HOME='../../customer/private'
SOFTWARE_HOME='../..'
SOFTWARE_URL=''
__builtins__['CUSTOMER_HOME']='../../customer/private'
__builtins__['SOFTWARE_HOME']='../..'
__builtins__['SOFTWARE_URL']='../..'
from SingleThreadedTransaction import PickleDictionary, Persistent
from SingleThreadedTransaction import PersistentMapping
import STPDocumentTemplate
from App.Dialogs import MessageDialog
HTML = STPDocumentTemplate.HTML
import DocumentTemplate
class HTML(DocumentTemplate.HTML,Persistent,):
"Persistent HTML Document Templates"
class HTMLDefault(DocumentTemplate.HTMLDefault,Persistent,):
"Persistent Default HTML Document Templates"
class HTMLFile(STPDocumentTemplate.HTMLFile):
""" """
class HTMLFile(DocumentTemplate.HTMLFile,Persistent,):
"Persistent HTML Document Templates read from files"
def __init__(self,name='',*args,**kw):
args=(self, '%s/lib/python/%s.dtml' % (SOFTWARE_HOME,name),) + args
apply(STPDocumentTemplate.HTMLFile.__init__,args,kw)
try:
home=CUSTOMER_HOME, SOFTWARE_HOME, SOFTWARE_URL
CUSTOMER_HOME, SOFTWARE_HOME, SOFTWARE_URL = home
except:
CUSTOMER_HOME='../../customer/private'
SOFTWARE_HOME='../..'
SOFTWARE_URL=''
apply(HTMLFile.inheritedAttribute('__init__'),args,kw)
data_dir = CUSTOMER_HOME+'/var'
BobobaseName = '%s/Data.bbb' % data_dir
......@@ -35,6 +43,9 @@ HTML.shared_globals['SOFTWARE_URL']=SOFTWARE_URL
# Log
#
# $Log: Globals.py,v $
# Revision 1.5 1997/08/28 19:32:36 jim
# Jim told Paul to do it
#
# Revision 1.4 1997/08/13 22:14:04 jim
# *** empty log message ***
#
......
......@@ -9,7 +9,15 @@
##############################################################################
import ni, sys
import SimpleDB, Sync
class SyncDB(SimpleDB.Default, Sync.Synchronized):
pass
SimpleDB.Default=SyncDB
import Globals, OFS.Folder, OFS.Application, App.ApplicationManager
import OFS.Document
# Open the application database
Bobobase=OFS.Application.open_bobobase()
......@@ -24,11 +32,31 @@ except KeyError:
bobo_application=app
if not hasattr(app,'standard_html_footer'):
app.manage_addDocument('standard_html_footer','','',None,"</body></html>")
get_transaction().commit()
if not hasattr(app, 'standard_html_header'):
app.manage_addDocument('standard_html_header','','',None,
"""<html><head><title><!--#if title-->
<!--#var title--><!--#else title-->
<!--#var id--><!--#/if title--></title></head><body>""")
get_transaction().commit()
acls=app.AccessControlLists._data
pw='123'
if acls.has_key('manage'):
acls['manage']['superuser']=pw
else:
acls['manage']={'superuser':pw}
##############################################################################
# Revision Log
#
# $Log: Main.py,v $
# Revision 1.2 1997/08/28 19:32:36 jim
# Jim told Paul to do it
#
# Revision 1.1 1997/08/13 18:58:39 jim
# initial
#
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