Fixing up setup.py and making sure routes exist for site and publisher reports
Fixing up setup.py and making sure routes exist for site and publisher reports

--- a/ckanext/ga_report/controller.py
+++ b/ckanext/ga_report/controller.py
@@ -6,5 +6,11 @@
 
 class GaReport(BaseController):
     def index(self):
-        return render('index.html')
+        return render('ga_report/site/index.html')
 
+
+class GaPublisherReport(BaseController):
+
+    def index(self, id):
+        return render('ga_report/publisher/index.html')
+

--- a/ckanext/ga_report/plugin.py
+++ b/ckanext/ga_report/plugin.py
@@ -1,13 +1,14 @@
 import logging
 import ckan.lib.helpers as h
+import ckan.plugins as p
 from ckan.plugins import implements, toolkit
-import gasnippet
-import commands
-import dbutil
+#import gasnippet
+#import commands
+#import dbutil
 
 log = logging.getLogger('ckanext.ga-report')
 
-class GoogleAnalyticsPlugin(p.SingletonPlugin):
+class GAReportPlugin(p.SingletonPlugin):
     implements(p.IConfigurer, inherit=True)
     implements(p.IRoutes, inherit=True)
 
@@ -17,8 +18,13 @@
 
     def after_map(self, map):
         map.connect(
-            '/data/analytics/index',
-            controller='ckanext.ga-report.controller:GaReport',
+            '/data/analytics/usage',
+            controller='ckanext.ga_report.controller:GaReport',
+            action='index'
+        )
+        map.connect(
+            '/data/analytics/publisher/{id}',
+            controller='ckanext.ga_report.controller:GaPublisherReport',
             action='index'
         )
         return map

--- /dev/null
+++ b/ckanext/ga_report/templates/ga_report/publisher/index.html
@@ -1,1 +1,1 @@
-
+HAI

--- /dev/null
+++ b/ckanext/ga_report/templates/ga_report/site/index.html
@@ -1,1 +1,1 @@
-
+HAI Site

file:a/setup.py -> file:b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -27,7 +27,7 @@
 	"""
         [ckan.plugins]
 	# Add plugins here, eg
-	ga-report=ckanext.ga_report.plugin:GaReportPlugin
+	ga-report=ckanext.ga_report.plugin:GAReportPlugin
 
         [paste.paster_command]
         loadanalytics = ckanext.ga_report.command:LoadAnalytics