[Checkins] SVN: zope.paste/trunk/zope/paste/factory.py We don't
need to require a database, at least not in theory at this point
Philipp von Weitershausen
philikon at philikon.de
Thu Mar 29 20:35:38 EDT 2007
Log message for revision 73934:
We don't need to require a database, at least not in theory at this point
(WSGIPublisherApplication doesn't work too well w/o a database). One of the main
reasons of using PasteDeploy is, after all, decoupling the database definition
from the server definition, and therefore allowing Zope 3 to run w/o the ZODB
for example
Changed:
U zope.paste/trunk/zope/paste/factory.py
-=-
Modified: zope.paste/trunk/zope/paste/factory.py
===================================================================
--- zope.paste/trunk/zope/paste/factory.py 2007-03-29 22:56:25 UTC (rev 73933)
+++ zope.paste/trunk/zope/paste/factory.py 2007-03-30 00:35:34 UTC (rev 73934)
@@ -20,10 +20,6 @@
features += ('devmode',)
zope.app.appsetup.config(abspath(site_definition), features)
- if file_storage is None and db_definition is None:
- raise TypeError("You must either provide a 'file_storage' or a "
- "'db_definition' setting.")
-
if file_storage is not None and db_definition is not None:
raise TypeError("You may only provide a 'file_storage' or a "
"'db_definition' setting, not both.")
@@ -31,7 +27,7 @@
# open database
if file_storage is not None:
db = zope.app.appsetup.database(abspath(file_storage))
- else:
+ elif db_definition is not None:
schema_xml = os.path.join(os.path.dirname(__file__), 'schema.xml')
schema = ZConfig.loadSchema(schema_xml)
cfgroot, cfghandlers = ZConfig.loadConfig(
@@ -40,5 +36,7 @@
result, databases = multi_database(cfgroot.databases)
db = result[0]
zope.event.notify(zope.app.appsetup.DatabaseOpened(db))
+ else:
+ db = None
return WSGIPublisherApplication(db)
More information about the Checkins
mailing list