

def get_field_model(self, model):
    if (not isinstance(model, basestring)):
        return model
    try:
        return apps.get_model(model)
    except LookupError:
        try:
            (app_name, class_name) = model.split('.')
            module = importlib.import_module(('nodeconductor.%s.models' % app_name))
            return getattr(module, class_name)
        except (ImportError, AttributeError, IndexError):
            raise LoggerError(("Can't find model %s" % model))

dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/logging/loggers.py BaseLogger.get_field_model/original