2011-04-04 18:44:39 +02:00
|
|
|
import logging
|
2011-11-29 18:56:47 +01:00
|
|
|
from ckan.lib.base import BaseController, c, render
|
2011-04-04 18:44:39 +02:00
|
|
|
import dbutil
|
2011-02-11 12:21:19 +01:00
|
|
|
|
2011-04-04 18:44:39 +02:00
|
|
|
log = logging.getLogger('ckanext.googleanalytics')
|
2011-02-11 12:21:19 +01:00
|
|
|
|
|
|
|
class GAController(BaseController):
|
|
|
|
def view(self):
|
|
|
|
# get package objects corresponding to popular GA content
|
2011-04-05 11:38:25 +02:00
|
|
|
c.top_packages = dbutil.get_top_packages(limit=10)
|
|
|
|
c.top_resources = dbutil.get_top_resources(limit=10)
|
|
|
|
return render('summary.html')
|