コード例 #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?")
コード例 #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?")