ZODB.ZPublisher.ZApplicationWrapper.__init__

Documentation
Create an application wrapper.

The wrapper will check to make sure that there is a root object with the given name in the database. If there isn't, it will create one with the given class and arguments.
Parameters
TypeNameDefaultDocumentation
?db This is the database that the top-level application object will be stored in.
PyStringname The name (key) of the root object in the database that the application object will be stored under.
PyClassklass The Application object class, neede to create the application object if it doesn't exist.
PyTupleclass_args()Arguments to be passed to the class if the application object needs to be created.
PyStringversion_cookie_name The name of a cookie to look for to decide if a request applies to a version.
Example

import ZODB, ZODB.FileStorage, Persistence
from ZODB.ZApplication import ZApplicationWrapper

DB=ZODB.DB(ZODB.FileStorage.FileStorage('mydat.fs'))

class Application(Persistence.Persistent):
....

bobo_application=ZApplicationWrapper(
DB, 'Application',Application,(),'ZopeVersion')