'fragment': fragment_list_resource,
'tag': tag_list_resource,
}[model]
+ request.piwik_track = False
resp = resource(request, pk=pk, emitter_format=emitter_format)
if emitter_format == 'xml':
# Ugly, but quick way of stripping <?xml?> header and <response> tags.
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