[zopeorg-checkins] CVS: NZO_SiteLayoutRedux/var/zope - custom_zodb.py.in:1.2
Chris McDonough
chrism at zope.com
Wed Jul 2 16:52:18 EDT 2003
Update of /cvs-zopeorg/NZO_SiteLayoutRedux/var/zope
In directory cvs.zope.org:/tmp/cvs-serv20953/var/zope
Modified Files:
custom_zodb.py.in
Log Message:
First cut at working buildout.
=== NZO_SiteLayoutRedux/var/zope/custom_zodb.py.in 1.1.1.1 => 1.2 ===
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE
+#
+##############################################################################
+"""Zope database loader that pulls in the configuration from DBTab.
+
+$Id$
"""
- Create the storage for the Zope appserver.
-"""
-import os
-BASE_DIR = '<<BASE_DIR>>'
-DATA_FS_PATH = os.path.join( BASE_DIR, 'var', '<<INSTANCE_NAME>>', 'var', 'Data.fs' )
-if <<USE_ZEO_SERVER>>:
- import ZEO.ClientStorage, string
- host='<<ZEO_SERVER_HOST>>'
- port=<<ZEO_SERVER_PORT>>
- Storage=ZEO.ClientStorage.ClientStorage(
- (host, port), name='', storage='<<ZEO_SERVER_STORAGE>>')
+from Products.DBTab.MainConfiguration import configuration
-else:
- import ZODB.FileStorage
- Storage = ZODB.FileStorage.FileStorage( DATA_FS_PATH )
+DB = configuration.getDatabase('/', is_root=1)
More information about the zopeorg-checkins
mailing list