Commit e0f81eae authored by Michal Čihař's avatar Michal Čihař

Lazy loading of site models

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent e23fe572
......@@ -19,7 +19,6 @@
#
from django.core.exceptions import ImproperlyConfigured
from django.contrib.sites.models import Site
from django.core.cache import cache
from django.http import HttpResponseRedirect
from django.shortcuts import resolve_url
......@@ -69,6 +68,7 @@ def get_site_url(url=''):
Returns root url of current site with domain.
'''
from weblate.appsettings import ENABLE_HTTPS
from django.contrib.sites.models import Site
site = Site.objects.get_current()
return '{0}://{1}{2}'.format(
'https' if ENABLE_HTTPS else 'http',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment