def get_profile(self):
        """
        Returns site-specific profile for this user. Raises
        SiteProfileNotAvailable if this site does not allow profiles.
        """
        if not hasattr(self, '_profile_cache'):
            from django.conf import settings
            if not settings.AUTH_PROFILE_MODULE:
                raise SiteProfileNotAvailable
            try:
                app_label, model_name = settings.AUTH_PROFILE_MODULE.split('.')
                model = models.get_model(app_label, model_name)
                self._profile_cache = model._default_manager.get(user__id__exact=self.id)
            except (__HOLE__, ImproperlyConfigured):
                raise SiteProfileNotAvailable
        return self._profile_cache
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-0.96/django/contrib/auth/models.py/User.get_profile