Exemple #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?")
Exemple #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?")
 def begin(self, *a,**kw):
     DataHandler.begin(self, *a,**kw)
 def begin(self, *a, **kw):
     DataHandler.begin(self, *a, **kw)
Exemple #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)