-# -*- coding: utf-8 -*-
-# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
#
from django.conf import settings
from datetime import datetime
import logging
from functools import update_wrapper
#
from django.conf import settings
from datetime import datetime
import logging
from functools import update_wrapper
idsite=getattr(settings, 'PIWIK_SITE_ID', '0'),
rec=1,
idsite=getattr(settings, 'PIWIK_SITE_ID', '0'),
rec=1,
ua=request.META.get('HTTP_USER_AGENT', ''),
lang=request.META.get('HTTP_ACCEPT_LANGUAGE', ''),
token_auth=getattr(settings, 'PIWIK_TOKEN', ''),
ua=request.META.get('HTTP_USER_AGENT', ''),
lang=request.META.get('HTTP_ACCEPT_LANGUAGE', ''),
token_auth=getattr(settings, 'PIWIK_TOKEN', ''),
def wrap(request, *args, **kwargs):
if getattr(request, 'piwik_track', True):
track_request.delay(piwik_url(request))
def wrap(request, *args, **kwargs):
if getattr(request, 'piwik_track', True):
track_request.delay(piwik_url(request))