Ticket #7584: django-profile-manager.patch
File django-profile-manager.patch, 911 bytes (added by , 16 years ago) |
---|
-
trunk/django/contrib/auth/models.py
305 305 try: 306 306 app_label, model_name = settings.AUTH_PROFILE_MODULE.split('.') 307 307 model = models.get_model(app_label, model_name) 308 self._profile_cache = model._default_manager.get(user__id__exact=self.id) 308 if hasatttr(model._default_manager, 'get_for_user'): 309 self._profile_cache = model._default_manager.get_for_user(self) 310 else: 311 self._profile_cache = model._default_manager.get(user__id__exact=self.id) 309 312 except (ImportError, ImproperlyConfigured): 310 313 raise SiteProfileNotAvailable 311 314 return self._profile_cache