X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/aae232dcf008ab39db553bc1b20573fa00e3b191..0bd2c341a8b55f817c2e193a6c4658d52ef95961:/apps/api/handlers.py diff --git a/apps/api/handlers.py b/apps/api/handlers.py index c118d95df..89c726f8c 100644 --- a/apps/api/handlers.py +++ b/apps/api/handlers.py @@ -10,6 +10,7 @@ from django.conf import settings from django.contrib.sites.models import Site from django.core.cache import get_cache from django.core.urlresolvers import reverse +from django.utils.functional import lazy from django.utils.timezone import utc from piston.handler import AnonymousBaseHandler, BaseHandler from piston.utils import rc @@ -26,7 +27,8 @@ from wolnelektury.utils import tz from stats.utils import piwik_track -API_BASE = WL_BASE = MEDIA_BASE = 'http://' + Site.objects.get_current().domain +API_BASE = WL_BASE = MEDIA_BASE = lazy( + lambda: u'http://' + Site.objects.get_current().domain, unicode)() category_singular = {