ckanext-googleanalytics/ckanext/googleanalytics/controller.py

15 lines
392 B
Python
Raw Normal View History

2011-04-04 18:44:39 +02:00
import logging
from ckan.lib.base import *
2011-04-04 18:44:39 +02:00
import dbutil
2011-04-04 18:44:39 +02:00
log = logging.getLogger('ckanext.googleanalytics')
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')