def __init__(self, settings_dict, alias=None, *args, **kwargs):
        super(DatabaseWrapper, self).__init__(
            settings_dict,
            alias=alias,
            *args,
            **kwargs
        )

        if settings_dict['HOST']:
            kwargs['host'] = settings_dict['HOST']
        if settings_dict['PORT']:
            kwargs['port'] = int(settings_dict['PORT'])
        if 'OPTIONS' in settings_dict:
            kwargs.update(settings_dict['OPTIONS'])
        self.connection = ConnectionWrapper(**kwargs)

        try:
            self.features = DatabaseFeatures(self.connection)
        except TypeError:
            # Django < 1.3
            self.features = BaseDatabaseFeatures()

        try:
            self.ops = DatabaseOperations(self.connection)
        except TypeError:
            # Django < 1.4
            self.ops = DatabaseOperations()

        self.client = DatabaseClient(self)
        self.creation = DatabaseCreation(self)
        self.introspection = DatabaseIntrospection(self)
        try:
            self.validation = BaseDatabaseValidation(self)
        except TypeError:
            # Django < 1.2
            self.validation = BaseDatabaseValidation()

        settings_dict['SUPPORTS_TRANSACTIONS'] = False
        self.settings_dict = settings_dict
        self.alias = alias and alias or settings_dict['DATABASE_NAME']

        # transaction related attributes
        self.transaction_state = None
dataset/ETHPy150Open peterbe/django-mongokit/django_mongokit/mongodb/base.py/DatabaseWrapper.__init__/original