Skip to content

Commit

Permalink
ckan#16 / ga works with default uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
Gleb committed Feb 14, 2017
1 parent 1165fdf commit b7238dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion ckanext/googleanalytics/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from paste.util.multidict import MultiDict

from ckan.controllers.api import ApiController
from ckan.controllers.package import PackageController

log = logging.getLogger('ckanext.googleanalytics')

Expand Down
5 changes: 5 additions & 0 deletions ckanext/googleanalytics/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import gasnippet
from routes.mapper import SubMapper, Mapper as _Mapper
from pylons import config
from ckan.controllers.package import PackageController

import urllib2
import importlib
Expand Down Expand Up @@ -254,3 +255,7 @@ def modify_resource_download_route(self, map):
controller_class = getattr(module, route_controller[1])
controller_class.resource_download = post_analytics_decorator(
controller_class.resource_download)
else:
# If no custom uploader applied, use the default one
PackageController.resource_download = post_analytics_decorator(
PackageController.resource_download)

0 comments on commit b7238dc

Please sign in to comment.