Commit 5e9e7102 authored by Jim Fulton's avatar Jim Fulton

new names, esp for Aqueduct

parent e5806058
"""Global definitions""" """Global definitions"""
__version__='$Revision: 1.23 $'[11:-2] __version__='$Revision: 1.24 $'[11:-2]
import sys, os import sys, os
from DateTime import DateTime from DateTime import DateTime
...@@ -23,10 +23,10 @@ except: ...@@ -23,10 +23,10 @@ except:
SOFTWARE_URL=sys.modules['__builtin__'].SOFTWARE_URL='' SOFTWARE_URL=sys.modules['__builtin__'].SOFTWARE_URL=''
from BoboPOS2 import Persistent, PickleDictionary from BoboPOS import Persistent, PickleDictionary
import BoboPOS2.PersistentMapping import BoboPOS.PersistentMapping
sys.modules['PersistentMapping']=BoboPOS2.PersistentMapping # hack for bw comp sys.modules['PersistentMapping']=BoboPOS.PersistentMapping # hack for bw comp
from BoboPOS2.PersistentMapping import PersistentMapping from BoboPOS.PersistentMapping import PersistentMapping
import DocumentTemplate, MethodObject import DocumentTemplate, MethodObject
from AccessControl.PermissionRole import PermissionRole from AccessControl.PermissionRole import PermissionRole
......
...@@ -12,7 +12,7 @@ import sys, dcdb ...@@ -12,7 +12,7 @@ import sys, dcdb
dcdb.debug() # Make it easy to set a breakpoint near here. dcdb.debug() # Make it easy to set a breakpoint near here.
import os import os
from BoboPOS2 import SimpleDB, TJar, SingleThreadedTransaction from BoboPOS import SimpleDB, TJar, SingleThreadedTransaction
import Globals import Globals
import OFS.Application import OFS.Application
...@@ -21,8 +21,8 @@ import TreeDisplay.TreeTag ...@@ -21,8 +21,8 @@ import TreeDisplay.TreeTag
import Scheduler.Scheduler import Scheduler.Scheduler
# Setup support for broken objects: # Setup support for broken objects:
import OFS.Uninstalled, BoboPOS2.PickleJar import OFS.Uninstalled, BoboPOS.PickleJar
BoboPOS2.PickleJar.PickleJar.Broken=OFS.Uninstalled.Broken BoboPOS.PickleJar.PickleJar.Broken=OFS.Uninstalled.Broken
# Open the application database # Open the application database
Bobobase=OFS.Application.open_bobobase() Bobobase=OFS.Application.open_bobobase()
......
__doc__="""Object Manager __doc__="""Object Manager
$Id: ObjectManager.py,v 1.46 1998/11/20 18:16:37 jim Exp $""" $Id: ObjectManager.py,v 1.47 1998/12/02 12:11:48 jim Exp $"""
__version__='$Revision: 1.46 $'[11:-2] __version__='$Revision: 1.47 $'[11:-2]
import App.Management, Acquisition, App.Undo, Globals import App.Management, Acquisition, App.Undo, Globals
import App.FactoryDispatcher import App.FactoryDispatcher
...@@ -12,7 +12,7 @@ from Globals import MessageDialog, default__class_init__ ...@@ -12,7 +12,7 @@ from Globals import MessageDialog, default__class_init__
from string import find,join,lower,split from string import find,join,lower,split
from urllib import quote from urllib import quote
from DocumentTemplate import html_quote from DocumentTemplate import html_quote
from HTTP_ORB.Converters import type_converters from ZPublisher.Converters import type_converters
from DateTime import DateTime from DateTime import DateTime
class ObjectManager( class ObjectManager(
...@@ -505,6 +505,9 @@ class ObjectManager( ...@@ -505,6 +505,9 @@ class ObjectManager(
############################################################################## ##############################################################################
# #
# $Log: ObjectManager.py,v $ # $Log: ObjectManager.py,v $
# Revision 1.47 1998/12/02 12:11:48 jim
# new names, esp for Aqueduct
#
# Revision 1.46 1998/11/20 18:16:37 jim # Revision 1.46 1998/11/20 18:16:37 jim
# First crack at new layout and 1.5 support # First crack at new layout and 1.5 support
# #
......
...@@ -10,8 +10,8 @@ database_type='Gadfly' ...@@ -10,8 +10,8 @@ database_type='Gadfly'
########################################################################### ###########################################################################
__doc__='''%s Database Connection __doc__='''%s Database Connection
$Id: DA.py,v 1.2 1998/06/10 22:28:37 jim Exp $''' % database_type $Id: DA.py,v 1.3 1998/12/02 12:11:48 jim Exp $''' % database_type
__version__='$Revision: 1.2 $'[11:-2] __version__='$Revision: 1.3 $'[11:-2]
from db import DB, manage_DataSources from db import DB, manage_DataSources
import sys, DABase, Globals import sys, DABase, Globals
...@@ -23,7 +23,7 @@ def data_sources(): ...@@ -23,7 +23,7 @@ def data_sources():
manage_DataSources()) manage_DataSources())
addConnectionForm=Globals.HTMLFile('connectionAdd',globals()) addConnectionForm=Globals.HTMLFile('connectionAdd',globals())
def manage_addAqueductGadflyConnection( def manage_addZGadflyConnection(
self, id, title, connection, check=None, REQUEST=None): self, id, title, connection, check=None, REQUEST=None):
"""Add a DB connection to a folder""" """Add a DB connection to a folder"""
self._setObject(id, Connection( self._setObject(id, Connection(
...@@ -35,8 +35,8 @@ class Connection(DABase.Connection): ...@@ -35,8 +35,8 @@ class Connection(DABase.Connection):
" " " "
database_type=database_type database_type=database_type
id='%s_database_connection' % database_type id='%s_database_connection' % database_type
meta_type=title='Aqueduct %s Database Connection' % database_type meta_type=title='Zope %s Database Connection' % database_type
icon='misc_/Aqueduct%s/conn' % database_type icon='misc_/Z%s/conn' % database_type
def factory(self): return DB def factory(self): return DB
...@@ -65,6 +65,9 @@ class Connection(DABase.Connection): ...@@ -65,6 +65,9 @@ class Connection(DABase.Connection):
############################################################################## ##############################################################################
# #
# $Log: DA.py,v $ # $Log: DA.py,v $
# Revision 1.3 1998/12/02 12:11:48 jim
# new names, esp for Aqueduct
#
# Revision 1.2 1998/06/10 22:28:37 jim # Revision 1.2 1998/06/10 22:28:37 jim
# Added docstring to connection object so objects are publishable. # Added docstring to connection object so objects are publishable.
# #
......
...@@ -9,20 +9,20 @@ ...@@ -9,20 +9,20 @@
########################################################################### ###########################################################################
__doc__='''Database Connection __doc__='''Database Connection
$Id: DABase.py,v 1.3 1998/06/04 15:49:46 jim Exp $''' $Id: DABase.py,v 1.4 1998/12/02 12:11:48 jim Exp $'''
__version__='$Revision: 1.3 $'[11:-2] __version__='$Revision: 1.4 $'[11:-2]
from db import manage_DataSources from db import manage_DataSources
import AqueductDA.Connection, sys import Shared.DC.ZRDB.Connection, sys
from Globals import HTMLFile from Globals import HTMLFile
from ImageFile import ImageFile from ImageFile import ImageFile
from ExtensionClass import Base from ExtensionClass import Base
import Acquisition import Acquisition
class Connection(AqueductDA.Connection.Connection): class Connection(Shared.DC.ZRDB.Connection.Connection):
_isAnSQLConnection=1 _isAnSQLConnection=1
manage_options=AqueductDA.Connection.Connection.manage_options+( manage_options=Shared.DC.ZRDB.Connection.Connection.manage_options+(
{'label': 'Browse', 'action':'manage_browse'}, {'label': 'Browse', 'action':'manage_browse'},
# {'label': 'Design', 'action':'manage_tables'}, # {'label': 'Design', 'action':'manage_tables'},
) )
...@@ -189,6 +189,9 @@ field_icons={ ...@@ -189,6 +189,9 @@ field_icons={
############################################################################## ##############################################################################
# #
# $Log: DABase.py,v $ # $Log: DABase.py,v $
# Revision 1.4 1998/12/02 12:11:48 jim
# new names, esp for Aqueduct
#
# Revision 1.3 1998/06/04 15:49:46 jim # Revision 1.3 1998/06/04 15:49:46 jim
# Commented design tab. # Commented design tab.
# #
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
############################################################################## ##############################################################################
__doc__='''Generic Database Adapter Package Registration __doc__='''Generic Database Adapter Package Registration
$Id: __init__.py,v 1.3 1998/11/23 15:48:18 jim Exp $''' $Id: __init__.py,v 1.4 1998/12/02 12:11:48 jim Exp $'''
__version__='$Revision: 1.3 $'[11:-2] __version__='$Revision: 1.4 $'[11:-2]
import Globals, ImageFile, os import Globals, ImageFile, os
...@@ -18,7 +18,7 @@ classes=('DA.Connection',) ...@@ -18,7 +18,7 @@ classes=('DA.Connection',)
database_type='Gadfly' database_type='Gadfly'
misc_={'conn': misc_={'conn':
ImageFile.ImageFile('AqueductDA/www/DBAdapterFolder_icon.gif')} ImageFile.ImageFile('Shared/DC/ZRDB/www/DBAdapterFolder_icon.gif')}
for icon in ('table', 'view', 'stable', 'what', for icon in ('table', 'view', 'stable', 'what',
...@@ -27,8 +27,8 @@ for icon in ('table', 'view', 'stable', 'what', ...@@ -27,8 +27,8 @@ for icon in ('table', 'view', 'stable', 'what',
misc_[icon]=ImageFile.ImageFile('icons/%s.gif' % icon, globals()) misc_[icon]=ImageFile.ImageFile('icons/%s.gif' % icon, globals())
meta_types=( meta_types=(
{'name':'Aqueduct %s Database Connection' % database_type, {'name':'Zope %s Database Connection' % database_type,
'action':'manage_addAqueduct%sConnectionForm' % database_type, 'action':'manage_addZ%sConnectionForm' % database_type,
}, },
) )
...@@ -44,7 +44,7 @@ def getDA(): ...@@ -44,7 +44,7 @@ def getDA():
getDA() getDA()
def manage_addAqueductGadflyConnectionForm(self, REQUEST, *args, **kw): def manage_addZGadflyConnectionForm(self, REQUEST, *args, **kw):
" " " "
DA=getDA() DA=getDA()
return DA.addConnectionForm( return DA.addConnectionForm(
...@@ -52,23 +52,23 @@ def manage_addAqueductGadflyConnectionForm(self, REQUEST, *args, **kw): ...@@ -52,23 +52,23 @@ def manage_addAqueductGadflyConnectionForm(self, REQUEST, *args, **kw):
database_type=database_type, database_type=database_type,
data_sources=DA.data_sources) data_sources=DA.data_sources)
def manage_addAqueductGadflyConnection( def manage_addZGadflyConnection(
self, id, title, connection, check=None, REQUEST=None): self, id, title, connection, check=None, REQUEST=None):
" " " "
return getDA().manage_addAqueductGadflyConnection( return getDA().manage_addZGadflyConnection(
self, id, title, connection, check, REQUEST) self, id, title, connection, check, REQUEST)
methods={ methods={
'manage_addAqueductGadflyConnection': 'manage_addZGadflyConnection':
manage_addAqueductGadflyConnection, manage_addZGadflyConnection,
'manage_addAqueductGadflyConnectionForm': 'manage_addZGadflyConnectionForm':
manage_addAqueductGadflyConnectionForm, manage_addZGadflyConnectionForm,
} }
__ac_permissions__=( __ac_permissions__=(
('Add Aqueduct Gadfly Database Connections', ('Add Zope Gadfly Database Connections',
('manage_addAqueductGadflyConnectionForm', ('manage_addZGadflyConnectionForm',
'manage_addAqueductGadflyConnection')), 'manage_addZGadflyConnection')),
) )
j=os.path.join j=os.path.join
......
'''$Id: db.py,v 1.2 1998/05/21 15:33:56 jim Exp $''' '''$Id: db.py,v 1.3 1998/12/02 12:11:48 jim Exp $'''
# Copyright # Copyright
# #
# Copyright 1996 Digital Creations, L.C., 910 Princess Anne # Copyright 1996 Digital Creations, L.C., 910 Princess Anne
# Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All # Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All
# rights reserved. # rights reserved.
# #
__version__='$Revision: 1.2 $'[11:-2] __version__='$Revision: 1.3 $'[11:-2]
import string, sys, os import string, sys, os
from string import strip, split, find, join from string import strip, split, find, join
...@@ -24,14 +24,14 @@ def manage_DataSources(): ...@@ -24,14 +24,14 @@ def manage_DataSources():
except: except:
raise 'Gadfly Error', ( raise 'Gadfly Error', (
""" """
The Aqueduct Gadfly Database Adapter requires the The Zope Gadfly Database Adapter requires the
existence of the directory, <code>%s</code>. An error existence of the directory, <code>%s</code>. An error
occurred while trying to create this directory. occurred while trying to create this directory.
""" % data_dir) """ % data_dir)
if not os.path.isdir(data_dir): if not os.path.isdir(data_dir):
raise 'Gadfly Error', ( raise 'Gadfly Error', (
""" """
The Aqueduct Gadfly Database Adapter requires the The Zope Gadfly Database Adapter requires the
existence of the directory, <code>%s</code>. This existence of the directory, <code>%s</code>. This
exists, but is not a directory. exists, but is not a directory.
""" % data_dir) """ % data_dir)
...@@ -170,6 +170,9 @@ Defs={maybe_int: 'i', maybe_float:'n', maybe_string:'s', must_be_text:'t'} ...@@ -170,6 +170,9 @@ Defs={maybe_int: 'i', maybe_float:'n', maybe_string:'s', must_be_text:'t'}
########################################################################## ##########################################################################
# #
# $Log: db.py,v $ # $Log: db.py,v $
# Revision 1.3 1998/12/02 12:11:48 jim
# new names, esp for Aqueduct
#
# Revision 1.2 1998/05/21 15:33:56 jim # Revision 1.2 1998/05/21 15:33:56 jim
# Added logic to set up gadfly area on first use. # Added logic to set up gadfly area on first use.
# #
......
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
__doc__='''SQL Methods __doc__='''SQL Methods
$Id: SQL.py,v 1.5 1998/11/23 16:28:57 jim Exp $''' $Id: SQL.py,v 1.6 1998/12/02 12:11:49 jim Exp $'''
__version__='$Revision: 1.5 $'[11:-2] __version__='$Revision: 1.6 $'[11:-2]
import AqueductDA.DA import Shared.DC.ZRDB.DA
from Globals import HTMLFile from Globals import HTMLFile
def SQLConnectionIDs(self): def SQLConnectionIDs(self):
...@@ -44,8 +44,8 @@ def SQLConnectionIDs(self): ...@@ -44,8 +44,8 @@ def SQLConnectionIDs(self):
ids.sort() ids.sort()
return ids return ids
manage_addAqueductSQLMethodForm=HTMLFile('add', globals()) manage_addZSQLMethodForm=HTMLFile('add', globals())
def manage_addAqueductSQLMethod(self, id, title, def manage_addZSQLMethod(self, id, title,
connection_id, arguments, template, connection_id, arguments, template,
REQUEST=None): REQUEST=None):
"""Add an SQL Method """Add an SQL Method
...@@ -63,7 +63,7 @@ def manage_addAqueductSQLMethod(self, id, title, ...@@ -63,7 +63,7 @@ def manage_addAqueductSQLMethod(self, id, title,
self._setObject(id, SQL(id, title, connection_id, arguments, template)) self._setObject(id, SQL(id, title, connection_id, arguments, template))
if REQUEST is not None: return self.manage_main(self,REQUEST) if REQUEST is not None: return self.manage_main(self,REQUEST)
class SQL(AqueductDA.DA.DA): class SQL(Shared.DC.ZRDB.DA.DA):
"""SQL Database methods """SQL Database methods
SQL Database methods are used to access external SQL databases. SQL Database methods are used to access external SQL databases.
...@@ -101,8 +101,8 @@ class SQL(AqueductDA.DA.DA): ...@@ -101,8 +101,8 @@ class SQL(AqueductDA.DA.DA):
employees/employee_id/1234/service_record employees/employee_id/1234/service_record
""" """
meta_type='Aqueduct SQL Database Method' meta_type='Z SQL Database Method'
icon='misc_/AqueductSQLMethods/icon' icon='misc_/ZSQLMethods/icon'
manage_main=HTMLFile('edit', globals()) manage_main=HTMLFile('edit', globals())
...@@ -11,40 +11,40 @@ ...@@ -11,40 +11,40 @@
__doc__='''SQL Method Product __doc__='''SQL Method Product
$Id: __init__.py,v 1.4 1998/05/11 15:00:46 jim Exp $''' $Id: __init__.py,v 1.5 1998/12/02 12:11:49 jim Exp $'''
__version__='$Revision: 1.4 $'[11:-2] __version__='$Revision: 1.5 $'[11:-2]
from ImageFile import ImageFile from ImageFile import ImageFile
import Aqueduct.Search, SQL import Shared.DC.ZRDB.Search, SQL
classes=('SQL.SQL',) classes=('SQL.SQL',)
meta_types=( meta_types=(
{'name':'Aqueduct SQL Database Method', {'name':'Zope SQL Database Method',
'action':'manage_addAqueductSQLMethodForm', 'action':'manage_addZSQLMethodForm',
}, },
{'name':'Aqueduct Search Interface', {'name':'Zope Search Interface',
'action':'manage_addAqueductSearchForm' 'action':'manage_addZSearchForm'
}, },
) )
methods={ methods={
'manage_addAqueductSQLMethod': SQL.manage_addAqueductSQLMethod, 'manage_addZSQLMethod': SQL.manage_addZSQLMethod,
'manage_addAqueductSQLMethodForm': SQL.manage_addAqueductSQLMethodForm, 'manage_addZSQLMethodForm': SQL.manage_addZSQLMethodForm,
'SQLConnectionIDs': SQL.SQLConnectionIDs, 'SQLConnectionIDs': SQL.SQLConnectionIDs,
'manage_addAqueductSearchForm': Aqueduct.Search.addForm, 'manage_addZSearchForm': Shared.DC.ZRDB.Search.addForm,
'manage_addAqueductSearch': Aqueduct.Search.add, 'manage_addZSearch': Shared.DC.ZRDB.Search.add,
'aqueductQueryIds': Aqueduct.Search.aqueductQueryIds, 'ZQueryIds': Shared.DC.ZRDB.Search.ZQueryIds,
} }
misc_={ misc_={
'icon': ImageFile('AqueductDA/www/DBAdapter_icon.gif'), 'icon': ImageFile('Shared/DC/ZRDB/www/DBAdapter_icon.gif'),
} }
__ac_permissions__=( __ac_permissions__=(
('Add Database Methods', ('Add Database Methods',
('manage_addAqueductSQLMethodForm', 'manage_addAqueductSQLMethod')), ('manage_addZSQLMethodForm', 'manage_addZSQLMethod')),
('Open/Close Database Connections', ()), ('Open/Close Database Connections', ()),
('Change Database Methods', ()), ('Change Database Methods', ()),
('Change Database Connections', ()), ('Change Database Connections', ()),
...@@ -54,6 +54,9 @@ __ac_permissions__=( ...@@ -54,6 +54,9 @@ __ac_permissions__=(
############################################################################## ##############################################################################
# #
# $Log: __init__.py,v $ # $Log: __init__.py,v $
# Revision 1.5 1998/12/02 12:11:49 jim
# new names, esp for Aqueduct
#
# Revision 1.4 1998/05/11 15:00:46 jim # Revision 1.4 1998/05/11 15:00:46 jim
# Updated permissions. # Updated permissions.
# #
......
...@@ -8,11 +8,12 @@ ...@@ -8,11 +8,12 @@
# rights reserved. # rights reserved.
# #
############################################################################## ##############################################################################
__doc__='''Shared Aqueduct classes and functions __doc__='''Shared classes and functions
$Id: Aqueduct.py,v 1.25 1998/05/12 20:14:54 jim Exp $''' $Id: Aqueduct.py,v 1.26 1998/12/02 12:11:49 jim Exp $'''
__version__='$Revision: 1.25 $'[11:-2] __version__='$Revision: 1.26 $'[11:-2]
import Globals, os
from Globals import HTMLFile, Persistent from Globals import HTMLFile, Persistent
import DocumentTemplate, DateTime, regex, regsub, string, rotor import DocumentTemplate, DateTime, regex, regsub, string, rotor
import binascii, Acquisition import binascii, Acquisition
...@@ -24,7 +25,7 @@ from DocumentTemplate import HTML ...@@ -24,7 +25,7 @@ from DocumentTemplate import HTML
from string import strip from string import strip
dtml_dir="%s/lib/python/Aqueduct/" % SOFTWARE_HOME dtml_dir=Globals.package_home(globals())
InvalidParameter='Invalid Parameter' InvalidParameter='Invalid Parameter'
...@@ -129,7 +130,7 @@ class Composite: ...@@ -129,7 +130,7 @@ class Composite:
return map( return map(
lambda k, queries=self.queries: lambda k, queries=self.queries:
{'id': k, 'selected': k in queries}, {'id': k, 'selected': k in queries},
self.aqueductQueryIds()) self.ZQueryIds())
def default_input_form(id,arguments,action='query', def default_input_form(id,arguments,action='query',
tabs=''): tabs=''):
...@@ -191,7 +192,7 @@ def default_input_form(id,arguments,action='query', ...@@ -191,7 +192,7 @@ def default_input_form(id,arguments,action='query',
custom_default_report_src=DocumentTemplate.File( custom_default_report_src=DocumentTemplate.File(
dtml_dir+'customDefaultReport.dtml') os.path.join(dtml_dir,'customDefaultReport.dtml'))
def custom_default_report(id, result, action='', no_table=0, def custom_default_report(id, result, action='', no_table=0,
goofy=regex.compile('[^a-zA-Z0-9_]').search goofy=regex.compile('[^a-zA-Z0-9_]').search
...@@ -386,88 +387,3 @@ def delimited_output(results,REQUEST,RESPONSE): ...@@ -386,88 +387,3 @@ def delimited_output(results,REQUEST,RESPONSE):
results), results),
'\n') '\n')
) )
##############################################################################
#
# $Log: Aqueduct.py,v $
# Revision 1.25 1998/05/12 20:14:54 jim
# Fixed report wizard to generate exprs when column names are goofy.
#
# Revision 1.24 1998/04/20 14:42:34 jim
# Forgot __len__ in Args.
#
# Revision 1.23 1998/04/15 14:55:26 jim
# Fixed InvalidParameter NameError
#
# Revision 1.22 1998/04/15 14:23:36 jim
# Changed parse to return a mapping object that keeps its
# items sorted in original order.
#
# Revision 1.21 1998/04/14 15:20:39 jim
# No longer sort items in input form.
#
# Revision 1.20 1998/01/12 20:36:26 jim
# Fixed bug in report generation.
#
# Revision 1.19 1998/01/12 19:19:48 jim
# *** empty log message ***
#
# Revision 1.18 1998/01/12 19:18:34 jim
# *** empty log message ***
#
# Revision 1.17 1998/01/09 13:58:14 jim
# added option for tabular vs record reports
#
# Revision 1.16 1997/12/12 23:38:04 jim
# Added debugging info.
#
# Revision 1.15 1997/12/05 21:26:54 jim
# Minor change to help out testing DAs.
#
# Revision 1.14 1997/12/05 21:23:55 jim
# Minor change to help out testing DAs.
#
# Revision 1.13 1997/10/09 15:10:37 jim
# Added some attempts to provide backward compatibility with earlier
# Principia version.
#
# Added support for empty string as default.
#
# Revision 1.12 1997/09/26 22:17:36 jim
# more
#
# Revision 1.11 1997/09/25 22:33:01 jim
# fixed argument handling bugs
#
# Revision 1.10 1997/09/25 21:45:08 jim
# Fixed argument parse bug
#
# Revision 1.9 1997/09/25 21:11:13 jim
# cleanup and other work
#
# Revision 1.8 1997/09/25 18:40:57 jim
# new interfaces and RDB
#
# Revision 1.7 1997/09/22 18:43:46 jim
# Got rid of ManageHTML
#
# Revision 1.6 1997/08/15 22:28:18 jim
# Added machinery to get argument values from instance attributes.
#
# Revision 1.5 1997/08/06 18:19:14 jim
# Renamed description->title and name->id and other changes
#
# Revision 1.4 1997/07/29 00:38:39 jim
# Changed to use get due to odbc lamosity.
#
# Revision 1.3 1997/07/28 22:32:20 jim
# *** empty log message ***
#
# Revision 1.2 1997/07/28 21:27:17 jim
# Changed generated input forms to use post.
#
# Revision 1.1 1997/07/25 16:07:18 jim
# initial
#
#
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
__doc__='''Generic Database adapter __doc__='''Generic Database adapter
$Id: DA.py,v 1.52 1998/11/23 16:12:08 jim Exp $''' $Id: DA.py,v 1.53 1998/12/02 12:11:49 jim Exp $'''
__version__='$Revision: 1.52 $'[11:-2] __version__='$Revision: 1.53 $'[11:-2]
import OFS.SimpleItem, Aqueduct.Aqueduct, Aqueduct.RDB import OFS.SimpleItem, Aqueduct, RDB
import DocumentTemplate, marshal, md5, base64, DateTime, Acquisition, os import DocumentTemplate, marshal, md5, base64, DateTime, Acquisition, os
from Aqueduct.Aqueduct import decodestring, parse, Rotor from Aqueduct import decodestring, parse, Rotor
from Aqueduct.Aqueduct import custom_default_report, default_input_form from Aqueduct import custom_default_report, default_input_form
from Globals import HTMLFile, MessageDialog from Globals import HTMLFile, MessageDialog
from cStringIO import StringIO from cStringIO import StringIO
import sys, Globals, OFS.SimpleItem, AccessControl.Role import sys, Globals, OFS.SimpleItem, AccessControl.Role
...@@ -29,7 +29,7 @@ md5new=md5.new ...@@ -29,7 +29,7 @@ md5new=md5.new
import ExtensionClass import ExtensionClass
import DocumentTemplate.DT_Util import DocumentTemplate.DT_Util
from cPickle import dumps, loads from cPickle import dumps, loads
from Aqueduct.Results import Results from Results import Results
from App.Extensions import getBrain from App.Extensions import getBrain
class SQL(DocumentTemplate.HTML): class SQL(DocumentTemplate.HTML):
...@@ -41,7 +41,7 @@ class SQL(DocumentTemplate.HTML): ...@@ -41,7 +41,7 @@ class SQL(DocumentTemplate.HTML):
class DA( class DA(
Aqueduct.Aqueduct.BaseQuery,Acquisition.Implicit, Aqueduct.BaseQuery,Acquisition.Implicit,
Globals.Persistent, Globals.Persistent,
AccessControl.Role.RoleManager, AccessControl.Role.RoleManager,
OFS.SimpleItem.Item, OFS.SimpleItem.Item,
...@@ -80,7 +80,7 @@ class DA( ...@@ -80,7 +80,7 @@ class DA(
self.id=id self.id=id
self.manage_edit(title, connection_id, arguments, template) self.manage_edit(title, connection_id, arguments, template)
manage_advancedForm=HTMLFile('AqueductDA/advanced') manage_advancedForm=HTMLFile('advanced', globals())
test_url___roles__=None test_url___roles__=None
def test_url_(self): def test_url_(self):
...@@ -313,7 +313,7 @@ class DA( ...@@ -313,7 +313,7 @@ class DA(
else: else:
brain=self._v_brain=getBrain(self.class_file_, self.class_name_) brain=self._v_brain=getBrain(self.class_file_, self.class_name_)
if type(result) is type(''): if type(result) is type(''):
result=Aqueduct.RDB.File(StringIO(result),brain,self) result=RDB.File(StringIO(result),brain,self)
else: else:
result=Results(result, brain, self) result=Results(result, brain, self)
columns=result._searchable_result_columns() columns=result._searchable_result_columns()
...@@ -434,171 +434,3 @@ class Traverse(ExtensionClass.Base): ...@@ -434,171 +434,3 @@ class Traverse(ExtensionClass.Base):
if hasattr(r, name): return getattr(r,name) if hasattr(r, name): return getattr(r,name)
return getattr(self.__dict__['_da'], name) return getattr(self.__dict__['_da'], name)
##############################################################################
#
# $Log: DA.py,v $
# Revision 1.52 1998/11/23 16:12:08 jim
# rid of Persistence module reference
#
# Revision 1.51 1998/08/03 13:45:10 jim
# Extensions management aspecs of brains have been moved to App/Extensions.
#
# Revision 1.50 1998/07/12 23:15:09 jim
# Changed editing screen:
# - size prefs now separate from Document prefs
# - Fized bug that caused src changes to be lost
#
# Revision 1.49 1998/07/12 21:01:20 jim
# Added support for DA's that return data directly as list of item descriptions
# (i.e. schema) and list of rows.
#
# Began adding support for pickle-based network protocol that, alas, may
# fall by the wayside. Waaaa.
#
# Revision 1.48 1998/06/26 21:51:28 jim
# Added resize buttons.
#
# Revision 1.47 1998/05/11 15:00:13 jim
# Updated permissions.
#
# Revision 1.46 1998/05/08 15:00:27 jim
# Changed permission settings to be in line with new machinery.
#
# Revision 1.45 1998/04/29 21:17:51 jim
# Changed to use acquired parent.
#
# Revision 1.44 1998/04/27 18:59:56 jim
# Now use exported sql_quote__ function to quote strings.
#
# Revision 1.43 1998/04/27 18:56:13 jim
# Now export an sql_quote function that is used by sqlvar and sqltest
# to quote strings.
#
# Revision 1.42 1998/04/27 18:31:32 jim
# Changed the way quoting was exported.
#
# Revision 1.41 1998/04/27 16:11:11 jim
# Stuff DA into template dict so that sqlvar and sqltest can use it.
#
# Revision 1.40 1998/03/18 13:45:04 jim
# Added doc strings.
#
# Revision 1.39 1998/03/17 21:16:08 brian
# Changed __call__ to detect whether it is being called via the
# web, or via dtml, and bind itself accordingly.
#
# Revision 1.38 1998/03/17 19:29:05 jim
# Added support for sqlvar, sqltest, and sqlgroup tags.
#
# Changed the way template is invoked, so that the 'self' is the
# folder containing the method.
#
# Revision 1.37 1998/03/10 21:18:03 jim
# Traversal not stops when all arguments have been given.
#
# Revision 1.36 1998/02/23 14:41:26 jim
# Added code to remove module from cache on reload.
#
# Revision 1.35 1998/02/20 22:25:35 jim
# Fixed up traversal machinery to work correctly with acquisition,
# especially method acquisition.
#
# Revision 1.34 1998/02/18 23:46:53 jim
# Added reparenting magic for NE interface.
#
# Revision 1.33 1998/01/28 18:14:40 jim
# Added logic to clear cache on edit.
#
# Revision 1.32 1998/01/28 18:13:48 jim
# Fixed bug in clearing cache.
#
# Revision 1.31 1998/01/28 16:04:40 jim
# Removed Cancel button from test input form.
#
# Revision 1.30 1998/01/27 20:08:19 jim
# Fixed bugs in caching logic.
#
# Revision 1.29 1998/01/27 18:37:39 jim
# Changed the way that errors are reported.
#
# Revision 1.28 1998/01/26 21:40:41 jim
# Fixed bug in caching code.
#
# Revision 1.27 1998/01/22 20:50:53 jim
# Fixed stupid typo in text output form.
#
# Revision 1.26 1998/01/22 20:32:50 jim
# Fixed bug in testing code and added output of SQL query.
#
# Revision 1.25 1998/01/21 22:59:34 jim
# Updated for latest security model.
#
# Revision 1.24 1998/01/21 20:56:55 brian
# Changed Access Control tab to Security
#
# Revision 1.23 1998/01/16 21:33:48 jim
# Now pass self to RDB.File so record constructors can acquire.
#
# Revision 1.22 1998/01/12 20:02:23 jim
# Added support for keyword arguments to methods.
#
# Revision 1.21 1998/01/09 21:58:25 jim
# Fixed bug in handling of arguments.
#
# Revision 1.20 1998/01/09 20:37:40 jim
# Fixed stupid bug in manage_test.
#
# Revision 1.19 1998/01/08 21:28:21 jim
# Fixed to show errors when run in testing mode.
#
# Revision 1.18 1998/01/07 16:27:16 jim
# Brought up to date with latest Principia models.
#
# Revision 1.17 1997/12/18 13:35:31 jim
# Added ImageFile usage.
#
# Revision 1.16 1997/12/05 21:33:13 jim
# major overhall to add record addressing, brains, and support for new interface
#
# Revision 1.15 1997/11/26 20:06:03 jim
# New Architecture, note that backward compatibility tools are needed
#
# Revision 1.12 1997/09/26 22:17:45 jim
# more
#
# Revision 1.11 1997/09/25 21:11:52 jim
# got rid of constructor
#
# Revision 1.10 1997/09/25 18:47:53 jim
# made index_html public
#
# Revision 1.9 1997/09/25 18:41:20 jim
# new interfaces
#
# Revision 1.8 1997/09/25 17:35:30 jim
# Made some corrections for network behavior.
#
# Revision 1.7 1997/09/22 18:44:38 jim
# Got rid of ManageHTML
# Fixed bug in manage_test that caused extra database updates.
#
# Revision 1.6 1997/08/15 22:29:12 jim
# Fixed bug in passing query arguments.
#
# Revision 1.5 1997/08/08 22:55:32 jim
# Improved connection status management and added database close method.
#
# Revision 1.4 1997/08/06 18:19:29 jim
# Renamed description->title and name->id and other changes
#
# Revision 1.3 1997/07/28 21:31:04 jim
# Get rid of add method here and test scaffolding.
#
# Revision 1.2 1997/07/25 16:49:31 jim
# Added manage_addDAFolder, which can be shared by various DAs.
#
# Revision 1.1 1997/07/25 16:43:05 jim
# initial
#
#
/***********************************************************
Copyright
Copyright 1997 Digital Creations, L.L.C., 910 Princess Anne
Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All
rights reserved.
******************************************************************/
static char Record_module_documentation[] =
""
"\n$Id: Record.c,v 1.4 1998/07/27 13:09:58 jim Exp $"
;
#ifdef PERSISTENCE
#include "cPersistence.h"
#else
#include "ExtensionClass.h"
#endif
/* ----------------------------------------------------- */
static void PyVar_Assign(PyObject **v, PyObject *e) { Py_XDECREF(*v); *v=e;}
#define ASSIGN(V,E) PyVar_Assign(&(V),(E))
#define UNLESS(E) if(!(E))
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E); UNLESS(V)
#define OBJECT(O) ((PyObject*)(O))
static PyObject *py___record_schema__;
/* Declarations for objects of type Record */
typedef struct {
#ifdef PERSISTENCE
cPersistent_HEAD
#else
PyObject_HEAD
#endif
PyObject **data;
PyObject *schema;
} Record;
staticforward PyExtensionClass RecordType;
/* ---------------------------------------------------------------- */
static int
Record_init(Record *self)
{
int l;
UNLESS(self->schema)
UNLESS(self->schema=PyObject_GetAttr(OBJECT(self->ob_type),
py___record_schema__)) return -1;
if((l=PyObject_Length(self->schema)) < 0) return -1;
UNLESS(self->data)
{
UNLESS(self->data=malloc(sizeof(PyObject*)*l))
{
PyErr_NoMemory();
return -1;
}
memset(self->data, 0, sizeof(PyObject*)*l);
}
return l;
}
static PyObject *
Record___setstate__(Record *self, PyObject *args)
{
PyObject *state=0, *parent, **d;
int l, ls, i;
if((l=Record_init(self)) < 0) return NULL;
UNLESS(PyArg_ParseTuple(args, "|OO", &state, &parent)) return NULL;
if(state)
if(PyDict_Check(state))
{
PyObject *k, *v;
for(i=0; PyDict_Next(state, &i, &k, &v);)
if(k && v && PyObject_SetAttr(OBJECT(self),k,v) < 0)
PyErr_Clear();
}
else
{
if((ls=PyObject_Length(state)) < 0) return NULL;
for(i=0, d=self->data; i < l && i < ls; i++, d++)
{
ASSIGN(*d, PySequence_GetItem(state, i));
UNLESS(*d) return NULL;
}
}
Py_INCREF(Py_None);
return Py_None;
}
static PyObject *
Record___getstate__( Record *self, PyObject *args)
{
PyObject *r, **d, *v;
int i, l;
UNLESS(self->data) return PyTuple_New(0);
if((l=Record_init(self)) < 0) return NULL;
UNLESS(r=PyTuple_New(l)) return NULL;
for(d=self->data, i=0; i < l; i++, d++)
{
v= *d;
if(!v) v=Py_None;
Py_INCREF(v);
PyTuple_SET_ITEM(r,i,v);
}
return r;
}
static void
Record_deal(Record *self)
{
int l;
PyObject **d;
if(self->schema)
{
l=PyObject_Length(self->schema);
for(d=self->data; --l >= 0; d++)
{
Py_XDECREF(*d);
}
Py_DECREF(self->schema);
free(self->data);
}
}
#ifdef PERSISTENCE
static PyObject *
Record__p_deactivate(Record *self, PyObject *args)
{
Record_deal(self);
self->schema=NULL;
self->data=NULL;
self->state=cPersistent_GHOST_STATE;
Py_INCREF(Py_None);
return Py_None;
}
#endif
static struct PyMethodDef Record_methods[] = {
{"__getstate__", (PyCFunction)Record___getstate__, METH_VARARGS,
"__getstate__() -- Get the record's data"
},
{"__setstate__", (PyCFunction)Record___setstate__, METH_VARARGS,
"__setstate__(v) -- Set the record's data"
},
{"__init__", (PyCFunction)Record___setstate__, METH_VARARGS,
"__init__([v]) -- Initialize a record, possibly with state"
},
#ifdef PERSISTENCE
{"_p_deactivate", (PyCFunction)Record__p_deactivate, METH_VARARGS,
"_p_deactivate() -- Reset the record's data"
},
#endif
{NULL, NULL} /* sentinel */
};
/* ---------- */
static void
Record_dealloc(Record *self)
{
Record_deal(self);
PyMem_DEL(self);
}
static PyObject *
Record_getattr(Record *self, PyObject *name)
{
int l, i;
PyObject *io;
if((l=Record_init(self)) < 0) return NULL;
if(io=Py_FindAttr((PyObject *)self, name)) return io;
PyErr_Clear();
if(io=PyObject_GetItem(self->schema, name))
{
UNLESS(PyInt_Check(io))
{
PyErr_SetString(PyExc_TypeError, "invalid record schema");
return NULL;
}
i=PyInt_AsLong(io);
if(i >= 0 && i < l)
{
ASSIGN(io, self->data[i]);
UNLESS(io) io=Py_None;
}
else ASSIGN(io, Py_None);
Py_INCREF(io);
return io;
}
PyErr_SetObject(PyExc_AttributeError, name);
return NULL;
}
static int
Record_setattr(Record *self, PyObject *name, PyObject *v)
{
int l, i;
PyObject *io;
if((l=Record_init(self)) < 0) return -1;
if(io=PyObject_GetItem(self->schema, name))
{
UNLESS(PyInt_Check(io))
{
PyErr_SetString(PyExc_TypeError, "invalid record schema");
return -1;
}
i=PyInt_AsLong(io);
Py_DECREF(io);
if(i >= 0 && i < l)
{
Py_XINCREF(v);
ASSIGN(self->data[i],v);
return 0;
}
}
PyErr_SetObject(PyExc_AttributeError, name);
return -1;
}
#ifdef PERSISTENCE
static PyObject *
pRecord_getattr(Record *self, PyObject *name)
{
char *c;
UNLESS(c=PyString_AsString(name)) return NULL;
return cPersistenceCAPI->pergetattro(OBJECT(self),name,c,
Record_getattr);
}
static int
pRecord_setattr(Record *self, PyObject *name, PyObject *v)
{
return cPersistenceCAPI->persetattro(OBJECT(self),name,v,Record_setattr);
}
#endif
static int
Record_compare(Record *v, Record *w)
{
int lv, lw, i, c;
PyObject **dv, **dw;
if((lv=Record_init(v)) < 0) return -1;
if((lw=Record_init(w)) < 0) return -1;
if(lw < lv) lv=lw;
for(i=0, dv=v->data, dw=w->data; i < lv; i++, dv++, dw++)
{
if(*dv)
if(*dw)
{
if(c=PyObject_Compare(*dv,*dw)) return c;
}
else return 1;
else if(*dw) return -1;
}
if(*dv) return 1;
if(*dw) return -1;
return 0;
}
/* Code to handle accessing Record objects as sequence objects */
static PyObject *
Record_concat(Record *self, PyObject *bb)
{
PyErr_SetString(PyExc_TypeError,
"Record objects do not support concatenation");
return NULL;
}
static PyObject *
Record_repeat(Record *self, int n)
{
PyErr_SetString(PyExc_TypeError,
"Record objects do not support repetition");
return NULL;
}
static PyObject *
IndexError(int i)
{
PyObject *v;
if((v=PyInt_FromLong(i)))
{
PyErr_SetObject(PyExc_IndexError, v);
Py_DECREF(v);
}
return NULL;
}
static PyObject *
Record_item(Record *self, int i)
{
PyObject *o;
int l;
if((l=Record_init(self)) < 0) return NULL;
if(i < 0 || i >= l) return IndexError(i);
o=self->data[i];
UNLESS(o) o=Py_None;
Py_INCREF(o);
return o;
}
static PyObject *
Record_slice(Record *self, int ilow, int ihigh)
{
PyErr_SetString(PyExc_TypeError,
"Record objects do not support slicing");
return NULL;
}
static int
Record_ass_item(Record *self, int i, PyObject *v)
{
int l;
if((l=Record_init(self)) < 0) return -1;
if(i < 0 || i >= l)
{
IndexError(i);
return -1;
}
UNLESS(v)
{
PyErr_SetString(PyExc_TypeError,"cannot delete record items");
return -1;
}
Py_INCREF(v);
ASSIGN(self->data[i], v);
return 0;
}
static int
Record_ass_slice(Record *self, int ilow, int ihigh, PyObject *v)
{
PyErr_SetString(PyExc_TypeError,
"Record objects do not support slice assignment");
return -1;
}
static PySequenceMethods Record_as_sequence = {
(inquiry)Record_init, /*sq_length*/
(binaryfunc)Record_concat, /*sq_concat*/
(intargfunc)Record_repeat, /*sq_repeat*/
(intargfunc)Record_item, /*sq_item*/
(intintargfunc)Record_slice, /*sq_slice*/
(intobjargproc)Record_ass_item, /*sq_ass_item*/
(intintobjargproc)Record_ass_slice, /*sq_ass_slice*/
};
/* -------------------------------------------------------------- */
static PyObject *
Record_subscript(Record *self, PyObject *key)
{
int i, l;
PyObject *io;
if((l=Record_init(self)) < 0) return NULL;
if(PyInt_Check(key))
{
i=PyInt_AsLong(key);
if(i<0) i+=l;
return Record_item(self, i);
}
if(io=PyObject_GetItem(self->schema, key))
{
UNLESS(PyInt_Check(io))
{
PyErr_SetString(PyExc_TypeError, "invalid record schema");
return NULL;
}
i=PyInt_AsLong(io);
if(i >= 0 && i < l)
{
ASSIGN(io, self->data[i]);
UNLESS(io) io=Py_None;
}
else ASSIGN(io, Py_None);
Py_INCREF(io);
return io;
}
return NULL;
}
static int
Record_ass_sub(Record *self, PyObject *key, PyObject *v)
{
int i, l;
PyObject *io;
if((l=Record_init(self)) < 0) return -1;
if(PyInt_Check(key))
{
i=PyInt_AsLong(key);
if(i<0) i+=l;
return Record_ass_item(self, i, v);
}
if(io=PyObject_GetItem(self->schema, key))
{
UNLESS(PyInt_Check(io))
{
PyErr_SetString(PyExc_TypeError, "invalid record schema");
return -1;
}
i=PyInt_AsLong(io);
Py_DECREF(io);
if(i >= 0 && i < l)
{
Py_XINCREF(v);
ASSIGN(self->data[i],v);
return 0;
}
}
return -1;
}
static PyMappingMethods Record_as_mapping = {
(inquiry)Record_init, /*mp_length*/
(binaryfunc)Record_subscript, /*mp_subscript*/
(objobjargproc)Record_ass_sub, /*mp_ass_subscript*/
};
/* -------------------------------------------------------- */
static PyExtensionClass RecordType = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"Record", /*tp_name*/
sizeof(Record), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
(destructor)Record_dealloc, /*tp_dealloc*/
(printfunc)0, /*tp_print*/
(getattrfunc)0, /*obsolete tp_getattr*/
(setattrfunc)0, /*obsolete tp_setattr*/
(cmpfunc)Record_compare, /*tp_compare*/
(reprfunc)0, /*tp_repr*/
0, /*tp_as_number*/
&Record_as_sequence, /*tp_as_sequence*/
&Record_as_mapping, /*tp_as_mapping*/
(hashfunc)0, /*tp_hash*/
(ternaryfunc)0, /*tp_call*/
(reprfunc)0, /*tp_str*/
#ifdef PERSISTENCE
(getattrofunc)pRecord_getattr, /*tp_getattro*/
(setattrofunc)pRecord_setattr, /*tp_setattro*/
#else
(getattrofunc)Record_getattr, /*tp_getattro*/
(setattrofunc)Record_setattr, /*tp_setattro*/
#endif
/* Space for future expansion */
0L,0L,
"Simple Record Types", /* Documentation string */
METHOD_CHAIN(Record_methods),
EXTENSIONCLASS_NOINSTDICT_FLAG,
};
/* End of code for Record objects */
/* -------------------------------------------------------- */
/* List of methods defined in the module */
static struct PyMethodDef Module_Level__methods[] = {
{NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initRecord) */
void
initRecord()
{
PyObject *m, *d;
char *rev="$Revision: 1.4 $";
UNLESS(py___record_schema__=PyString_FromString("__record_schema__")) return;
UNLESS(ExtensionClassImported) return;
#ifdef PERSISTENCE
if(cPersistenceCAPI=PyCObject_Import("cPersistence","CAPI"))
{
static PyMethodChain m;
m.methods=RecordType.methods.methods;
RecordType.methods.methods=cPersistenceCAPI->methods->methods;
RecordType.methods.link=&m;
}
else return;
#endif
/* Create the module and add the functions */
m = Py_InitModule4("Record", Module_Level__methods,
Record_module_documentation,
(PyObject*)NULL,PYTHON_API_VERSION);
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
PyExtensionClass_Export(d,"Record",RecordType);
PyDict_SetItemString(d, "__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
/* Check for errors */
if (PyErr_Occurred()) Py_FatalError("can't initialize module Record");
}
/*****************************************************************************
Revision Log:
$Log: Record.c,v $
Revision 1.4 1998/07/27 13:09:58 jim
Changed _p___reinit__ to _p_deactivate.
Revision 1.3 1998/01/16 21:13:28 jim
Added extra ignored parent object argument to __init__ and
__setstate__.
Revision 1.2 1997/09/26 15:05:17 jim
Added sequence and mapping behavior.
Revision 1.1 1997/09/25 22:12:28 jim
*** empty log message ***
Revision 1.5 1997/07/16 20:17:45 jim
*** empty log message ***
Revision 1.4 1997/06/06 18:31:54 jim
Fixed bug in __getstate__ that caused core dumps when some attributes
were unset.
Revision 1.3 1997/05/19 14:05:46 jim
Fixed several bugs.
Revision 1.2 1997/04/30 11:37:35 jim
Fixed bug in reinitialization that probably explains the bug that
Ellen reported where ad attributes were set to None.
Revision 1.1 1997/04/27 09:18:42 jim
*** empty log message ***
$Revision 1.1 1997/02/24 23:25:42 jim
$initial
$
*****************************************************************************/
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
# rights reserved. # rights reserved.
# #
########################################################################## ##########################################################################
__doc__='''Aqueduct Search Interface Wizard __doc__='''Search Interface Wizard
$Id: Search.py,v 1.5 1998/04/15 14:22:28 jim Exp $''' $Id: Search.py,v 1.6 1998/12/02 12:11:49 jim Exp $'''
__version__='$Revision: 1.5 $'[11:-2] __version__='$Revision: 1.6 $'[11:-2]
from Globals import HTMLFile from Globals import HTMLFile
from Aqueduct import custom_default_report, nicify, Args from Aqueduct import custom_default_report, nicify, Args
...@@ -69,7 +69,7 @@ def add(self, report_id, report_title, report_style, ...@@ -69,7 +69,7 @@ def add(self, report_id, report_title, report_style,
if REQUEST: return self.manage_main(self,REQUEST) if REQUEST: return self.manage_main(self,REQUEST)
def aqueductQueryIds(self): def ZQueryIds(self):
# Note that report server configurations will expend on this # Note that report server configurations will expend on this
t=[] t=[]
ids={} ids={}
...@@ -179,6 +179,9 @@ def default_input_form(arguments,action='query', ...@@ -179,6 +179,9 @@ def default_input_form(arguments,action='query',
############################################################################## ##############################################################################
# #
# $Log: Search.py,v $ # $Log: Search.py,v $
# Revision 1.6 1998/12/02 12:11:49 jim
# new names, esp for Aqueduct
#
# Revision 1.5 1998/04/15 14:22:28 jim # Revision 1.5 1998/04/15 14:22:28 jim
# Fixed up input form generation to use input arguments in order. # Fixed up input form generation to use input arguments in order.
# Also excluse decorations when 1 query used. # Also excluse decorations when 1 query used.
......
# install Connection.py
# install DA.py
# install sqlgroup.py
# install sqltest.py
# install sqlvar.py
# install advanced.dtml
# install connectionAdd.dtml
# install connectionEdit.dtml
# install connectionStatus.dtml
# install dbi_db.py
# install www
...@@ -160,13 +160,13 @@ class PCGIPublisher: ...@@ -160,13 +160,13 @@ class PCGIPublisher:
self.StringIO = StringIO self.StringIO = StringIO
try: try:
from HTTP_ORB import publish_module from ZPublisher import publish_module
except ImportError: except ImportError:
try: try:
from cgi_module_publisher import publish_module from cgi_module_publisher import publish_module
except ImportError: except ImportError:
return self.fatalError( return self.fatalError(
"unable to import publish_module from HTTP_ORB") "unable to import publish_module from ZPublisher")
self.publish_module = publish_module self.publish_module = publish_module
......
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