fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix in librarian
[wolnelektury.git]
/
apps
/
stats
/
utils.py
diff --git
a/apps/stats/utils.py
b/apps/stats/utils.py
index
921921d
..
474d1b5
100644
(file)
--- a/
apps/stats/utils.py
+++ b/
apps/stats/utils.py
@@
-2,7
+2,6
@@
# 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 Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
-from django.contrib.sites.models import Site
from django.conf import settings
from datetime import datetime
import logging
from django.conf import settings
from datetime import datetime
import logging
@@
-48,7
+47,8
@@
def piwik_track(klass_or_method):
call_func = klass_or_method
def wrap(self, request, *args, **kw):
call_func = klass_or_method
def wrap(self, request, *args, **kw):
- track_request.delay(piwik_url(request))
+ if getattr(request, 'piwik_track', True):
+ track_request.delay(piwik_url(request))
return call_func(self, request, *args, **kw)
# and wrap it
return call_func(self, request, *args, **kw)
# and wrap it