def _get_formfield(self, db_field, **kwargs):
        # If we've got overrides for the formfield defined, use 'em. **kwargs
        # passed to formfield_for_dbfield override the defaults.
        for klass in db_field.__class__.mro():
            if klass in self.formfield_overrides:
                kwargs.update(self.formfield_overrides[klass])
                break
        return formfield(db_field, **kwargs)
Return overridden formfield if exists, otherwise default formfield
dataset/ETHPy150Open jschrewe/django-mongoadmin/mongoadmin/options.py/MongoFormFieldMixin._get_formfield