示例#1
0
	def __init__(self, settings_dict, alias='default'):
		super(DatabaseWrapper, self).__init__(settings_dict, alias)
		
		self.validate_settings(settings_dict)
		
		self.features = DatabaseFeatures(self)
		self.ops = DatabaseOperations(self)
		self.client = DatabaseClient(self)
		self.creation = DatabaseCreation(self)
		self.introspection = DatabaseIntrospection(self)
		self.validation = DatabaseValidation(self)
示例#2
0
    def __init__(self, settings_dict, alias=None):
        alias = alias or sf_alias
        super(DatabaseWrapper, self).__init__(settings_dict, alias)

        self.validate_settings(settings_dict)

        self.features = DatabaseFeatures(self)
        self.ops = DatabaseOperations(self)
        self.client = DatabaseClient(self)
        self.creation = DatabaseCreation(self)
        self.introspection = DatabaseIntrospection(self)
        self.validation = DatabaseValidation(self)
        self._sf_session = None
        if not getattr(settings, 'SF_LAZY_CONNECT', False):
            self.make_session()
示例#3
0
    def __init__(self, settings_dict, alias=None):
        if alias is None:
            alias = getattr(settings, 'SALESFORCE_DB_ALIAS', 'salesforce')
        super(DatabaseWrapper, self).__init__(settings_dict, alias)

        self.validate_settings(settings_dict)

        if not DJANGO_111_PLUS:
            self.features = DatabaseFeatures(self)
            self.ops = DatabaseOperations(self)
            self.client = DatabaseClient(self)
            self.creation = DatabaseCreation(self)
            self.introspection = DatabaseIntrospection(self)
            self.validation = DatabaseValidation(self)
        self._is_sandbox = None
示例#4
0
    def __init__(self, settings_dict, alias=None):
        if alias is None:
            alias = getattr(settings, 'SALESFORCE_DB_ALIAS', 'salesforce')
        super(DatabaseWrapper, self).__init__(settings_dict, alias)

        self.validate_settings(settings_dict)

        self.features = DatabaseFeatures(self)
        self.ops = DatabaseOperations(self)
        self.client = DatabaseClient(self)
        self.creation = DatabaseCreation(self)
        self.introspection = DatabaseIntrospection(self)
        self.validation = DatabaseValidation(self)
        self._sf_session = None
        self._is_sandbox = None
        # The SFDC database is connected as late as possible if only tests
        # are running. Some tests don't require a connection.
        if not getattr(settings, 'SF_LAZY_CONNECT', 'test' in sys.argv):
            self.make_session()