

def import_field(field_classpath):
    '\n    Imports a field by its dotted class path, prepending "django.db.models"\n    to raw class names and raising an exception if the import fails.\n    '
    if ('.' in field_classpath):
        fully_qualified = field_classpath
    else:
        fully_qualified = ('django.db.models.%s' % field_classpath)
    try:
        return import_dotted_path(fully_qualified)
    except ImportError:
        raise ImproperlyConfigured(("The EXTRA_MODEL_FIELDS setting contains the field '%s' which could not be imported." % field_classpath))

dataset/ETHPy150Open stephenmcd/mezzanine/mezzanine/boot/__init__.py import_field/original