Skip to content

Commit

Permalink
Work-a-round for import loops
Browse files Browse the repository at this point in the history
  • Loading branch information
jedie committed Feb 12, 2015
1 parent 74daa46 commit b0c1a5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.creole
Expand Up @@ -197,6 +197,8 @@ to:

== history

* v0.26.1 - 12.02.2015
** Work-a-round for import loops
* v0.26.0 - 11.02.2015
** Updates for Django 1.6 and Python 3
* v0.25.1 - 18.11.2013
Expand Down
2 changes: 1 addition & 1 deletion django_tools/__init__.py
@@ -1,7 +1,7 @@
# coding: utf-8


__version__ = (0, 26, 0)
__version__ = (0, 26, 1)
VERSION_STRING = '.'.join(str(part) for part in __version__)


Expand Down
5 changes: 3 additions & 2 deletions django_tools/dynamic_site/middleware.py
Expand Up @@ -8,7 +8,7 @@
More info: read .../django_tools/dynamic_site/README.creole
:copyleft: 2011-2013 by the django-tools team, see AUTHORS for more details.
:copyleft: 2011-2015 by the django-tools team, see AUTHORS for more details.
:license: GNU GPL v3 or above, see LICENSE for more details.
"""

Expand All @@ -31,7 +31,7 @@
from django.utils import log

from django_tools.local_sync_cache.local_sync_cache import LocalSyncCache
from django_tools.dynamic_site.models import SiteAlias


USE_DYNAMIC_SITE_MIDDLEWARE = getattr(settings, "USE_DYNAMIC_SITE_MIDDLEWARE", False)

Expand Down Expand Up @@ -160,6 +160,7 @@ def _get_site_from_host(self, host):
site = Site.objects.get(domain__iexact=host)
except Site.DoesNotExist:
# Look if there is a alias
from django_tools.dynamic_site.models import SiteAlias # against import loops ;(
try:
site = SiteAlias.objects.get_from_host(host)
except SiteAlias.DoesNotExist:
Expand Down

0 comments on commit b0c1a5c

Please sign in to comment.