def get_profile_model():
    """
    Returns the Mezzanine profile model, defined in
    ``settings.AUTH_PROFILE_MODULE``, or ``None`` if no profile
    model is configured.
    """

    if not getattr(settings, "AUTH_PROFILE_MODULE", None):
        raise ProfileNotConfigured

    try:
        return apps.get_model(settings.AUTH_PROFILE_MODULE)
    except ValueError:
        raise ImproperlyConfigured("AUTH_PROFILE_MODULE must be of "
                                   "the form 'app_label.model_name'")
    except LookupError:
        raise ImproperlyConfigured("AUTH_PROFILE_MODULE refers to "
                                   "model '%s' that has not been installed"
                                   % settings.AUTH_PROFILE_MODULE)
dataset/ETHPy150Open stephenmcd/mezzanine/mezzanine/accounts/__init__.py/get_profile_model/original