From: David Read Date: Thu, 08 Nov 2012 10:08:08 +0000 Subject: Sort the dataset report by views, since we only display that now. X-Git-Url: https://maxious.lambdacomplex.org/git/?p=ckanext-ga-report.git&a=commitdiff&h=8c5081dedadf6c12309f05584952f9d36494e2f9 --- Sort the dataset report by views, since we only display that now. --- --- a/ckanext/ga_report/controller.py +++ b/ckanext/ga_report/controller.py @@ -232,7 +232,7 @@ return render('ga_report/publisher/index.html') def _get_packages(self, publisher=None, count=-1): - '''Returns the datasets in order of visits''' + '''Returns the datasets in order of views''' if count == -1: count = sys.maxint @@ -244,7 +244,7 @@ if publisher: q = q.filter(GA_Url.department_id==publisher.name) q = q.filter(GA_Url.period_name==month) - q = q.order_by('ga_url.visits::int desc') + q = q.order_by('ga_url.pageviews::int desc') top_packages = [] for entry,package in q.limit(count): if package: @@ -329,7 +329,7 @@ def _get_publishers(): ''' Returns a list of all publishers. Each item is a tuple: - (names, title) + (name, title) ''' publishers = [] for pub in model.Session.query(model.Group).\ --- a/ckanext/ga_report/templates/ga_report/notes.html +++ b/ckanext/ga_report/templates/ga_report/notes.html @@ -6,8 +6,8 @@
  • Notes