210 | | app, mod = settings.AUTH_PROFILE_MODULE.split('.') |
211 | | module = __import__('ellington.%s.apps.%s' % (app, mod), [], [], ['']) |
212 | | self._profile_cache = module.get(user_id=self.id) |
213 | | except ImportError: |
214 | | try: |
215 | | module = __import__('django.models.%s' % settings.AUTH_PROFILE_MODULE, [], [], ['']) |
216 | | self._profile_cache = module.get(user__id__exact=self.id) |
217 | | except ImportError: |
218 | | raise SiteProfileNotAvailable |
| 210 | app_label, model_name = settings.AUTH_PROFILE_MODULE.split('.') |
| 211 | model = models.get_model(app_label, model_name) |
| 212 | self._profile_cache = model._default_manager.get(user__id__exact=self.id) |
| 213 | except ImportError, ImproperlyConfigured: |
| 214 | raise SiteProfileNotAvailable |