djongo/base.py
def get_connection_params(self):
        """
        Default method to acquire database connection parameters.

        Sets connection parameters to match settings.py, and sets
        default values to blank fields.
        """
        valid_settings = {
            'NAME': 'name',
            'HOST': 'host',
            'PORT': 'port',
            'USER': 'username',
            'PASSWORD': 'password',
            'AUTH_SOURCE': 'authSource',
            'AUTH_MECHANISM': 'authMechanism',
            'ENFORCE_SCHEMA': 'enforce_schema',
            'REPLICASET': 'replicaset',
            'SSL': 'ssl',
            'SSL_CERTFILE': 'ssl_certfile',
            'SSL_CA_CERTS': 'ssl_ca_certs',
            'READ_PREFERENCE': 'read_preference'
        }
        connection_params = {
            'name': 'djongo_test',
            'enforce_schema': True
        }
        for setting_name, kwarg in valid_settings.items():
            try:
                setting = self.settings_dict[setting_name]
            except KeyError:
                continue

            if setting or setting is False:
                connection_params[kwarg] = setting

        return connection_params
def get_connection_params(self):
        """
        Default method to acquire database connection parameters.

        Sets connection parameters to match settings.py, and sets
        default values to blank fields.
        """
        valid_settings = {
            'NAME': 'name',
            'HOST': 'host',
            'PORT': 'port',
            'USER': 'username',
            'PASSWORD': 'password',
            'AUTH_SOURCE': 'authSource',
            'AUTH_MECHANISM': 'authMechanism',
            'ENFORCE_SCHEMA': 'enforce_schema',
            'REPLICASET': 'replicaset',
            'SSL': 'ssl',
            'SSL_CERTFILE': 'ssl_certfile',
            'SSL_CA_CERTS': 'ssl_ca_certs',
            'READ_PREFERENCE': 'read_preference'
        }
        connection_params = {
            'name': 'djongo_test',
            'enforce_schema': True
        }
        for setting_name, kwarg in valid_settings.items():
            try:
                setting = self.settings_dict[setting_name]
            except KeyError:
                continue

            if setting or setting is False:
                connection_params[kwarg] = setting

        return connection_params
Default method to acquire database connection parameters.

        Sets connection parameters to match settings.py, and sets
        default values to blank fields.