diff options
| author | Claude Paroz <claude@2xlibre.net> | 2013-11-16 11:13:04 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2013-11-16 11:13:04 +0100 |
| commit | b642d540d4ef2e72b0a89fe95b8777702ce08973 (patch) | |
| tree | 3bedaa6e4dc2f869c5cef4b45d60cce9a02fc631 | |
| parent | ceecc962ad8f6bbbc2b989aec53eee6c6cca04b9 (diff) | |
Moved import at proper place in contrib.sites
| -rw-r--r-- | django/contrib/sites/models.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/django/contrib/sites/models.py b/django/contrib/sites/models.py index bbd85ed3f6..18f72c9b84 100644 --- a/django/contrib/sites/models.py +++ b/django/contrib/sites/models.py @@ -2,11 +2,11 @@ from __future__ import unicode_literals import string +from django.core.exceptions import ImproperlyConfigured, ValidationError from django.db import models from django.db.models.signals import pre_save, pre_delete from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible -from django.core.exceptions import ValidationError SITE_CACHE = {} @@ -39,8 +39,10 @@ class SiteManager(models.Manager): try: sid = settings.SITE_ID except AttributeError: - from django.core.exceptions import ImproperlyConfigured - raise ImproperlyConfigured("You're using the Django \"sites framework\" without having set the SITE_ID setting. Create a site in your database and set the SITE_ID setting to fix this error.") + raise ImproperlyConfigured( + "You're using the Django \"sites framework\" without having " + "set the SITE_ID setting. Create a site in your database and " + "set the SITE_ID setting to fix this error.") try: current_site = SITE_CACHE[sid] except KeyError: |
