change summary page to use /dataset, not /package

This commit is contained in:
John Glover 2011-11-29 17:56:47 +00:00
parent 953b30c73c
commit c9e8a6b5d9
3 changed files with 4 additions and 5 deletions

View File

@ -92,7 +92,7 @@ Installation
Once your GA account has gathered some data, you can see some basic Once your GA account has gathered some data, you can see some basic
information about the most popular packages at: information about the most popular packages at:
http://mydomain.com/analytics/package/top http://mydomain.com/analytics/dataset/top
By default the only data that is injected into the public-facing By default the only data that is injected into the public-facing
website is on the package page, where number of downloads are website is on the package page, where number of downloads are

View File

@ -1,11 +1,9 @@
import logging import logging
from ckan.lib.base import * from ckan.lib.base import BaseController, c, render
import dbutil import dbutil
log = logging.getLogger('ckanext.googleanalytics') log = logging.getLogger('ckanext.googleanalytics')
class GAController(BaseController): class GAController(BaseController):
def view(self): def view(self):
# get package objects corresponding to popular GA content # get package objects corresponding to popular GA content

View File

@ -93,7 +93,8 @@ class GoogleAnalyticsPlugin(SingletonPlugin):
return stream return stream
def after_map(self, map): def after_map(self, map):
map.connect('analytics', '/analytics/package/top', map.redirect("/analytics/package/top", "/analytics/dataset/top")
map.connect('analytics', '/analytics/dataset/top',
controller='ckanext.googleanalytics.controller:GAController', controller='ckanext.googleanalytics.controller:GAController',
action='view') action='view')
return map return map