Ejemplo n.º 1
0
 def __init__(self, *a,**kw):
     DataHandler.__init__(self, *a,**kw)
     from sqlobject import sqlhub, connectionForURI
     if self.options.dsn:
         self.connection = connectionForURI(self.options.dsn)
     else:
         raise MisconfiguredHandler(
                 "--dsn option is required by %s" % self.__class__)
     if len(self.options.env):
         raise NotImplementedError(
             "sqlobject is not using --env; perhaps we just need to import "
             "the envs so that findClass knows about its objects?")
Ejemplo n.º 2
0
 def __init__(self, *a,**kw):
     DataHandler.__init__(self, *a,**kw)
     from sqlobject import connectionForURI
     if self.options.dsn:
         self.connection = connectionForURI(self.options.dsn)
     else:
         raise MisconfiguredHandler(
                 "--dsn option is required by %s" % self.__class__)
     if len(self.options.env):
         raise NotImplementedError(
             "sqlobject is not using --env; perhaps we just need to import "
             "the envs so that findClass knows about its objects?")
Ejemplo n.º 3
0
 def begin(self, *a,**kw):
     DataHandler.begin(self, *a,**kw)
Ejemplo n.º 4
0
 def begin(self, *a, **kw):
     DataHandler.begin(self, *a, **kw)
Ejemplo n.º 5
0
 def begin(self, *a, **kw):
     DataHandler.begin(self, *a, **kw)
     self.transaction = self.session_context.current.create_transaction()
     self.transaction.add(self.connection)