From: Ross Jones Date: Wed, 24 Oct 2012 10:53:29 +0000 Subject: Remembered to actually limit to the top 10 X-Git-Url: https://maxious.lambdacomplex.org/git/?p=ckanext-ga-report.git&a=commitdiff&h=02143fc67122fdfb799abe9ffd398f607d59260b --- Remembered to actually limit to the top 10 --- --- a/ckanext/ga_report/controller.py +++ b/ckanext/ga_report/controller.py @@ -52,7 +52,7 @@ entries = model.Session.query(GA_Url).\ filter(GA_Url.department_id==c.publisher.name).\ filter(GA_Url.period_name==c.month).\ - order_by('ga_url.pageviews desc').all() + order_by('ga_url.pageviews desc')[:10] for entry in entries: if entry.url.startswith('/dataset/'): p = model.Package.get(entry.url[len('/dataset/'):])