diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py
index 4e15849..cca5758 100644
a
|
b
|
import urllib
|
2 | 2 | |
3 | 3 | from django.core.exceptions import ImproperlyConfigured |
4 | 4 | from django.core.mail import send_mail |
5 | | from django.db import models |
| 5 | from django.db import models, router |
6 | 6 | from django.db.models.manager import EmptyManager |
7 | 7 | from django.utils.crypto import get_random_string |
8 | 8 | from django.utils.encoding import smart_str |
… |
… |
class User(models.Model):
|
396 | 396 | raise SiteProfileNotAvailable( |
397 | 397 | 'Unable to load the profile model, check ' |
398 | 398 | 'AUTH_PROFILE_MODULE in your project settings') |
399 | | self._profile_cache = model._default_manager.using( |
400 | | self._state.db).get(user__id__exact=self.id) |
| 399 | db = router.db_for_read(model) |
| 400 | self._profile_cache = model._default_manager.using(db).get( |
| 401 | user__id__exact=self.id) |
401 | 402 | self._profile_cache.user = self |
402 | 403 | except (ImportError, ImproperlyConfigured): |
403 | 404 | raise SiteProfileNotAvailable |