[ckan-changes] commit/ckanext-pdeu: amercader: Add controller to save emails from users in a GDoc spreadsheet. TODO: integrate in the WUI. Also move the rewiring controller to the controllers module

Bitbucket commits-noreply at bitbucket.org
Wed Jun 8 16:43:26 UTC 2011


1 new changeset in ckanext-pdeu:

http://bitbucket.org/okfn/ckanext-pdeu/changeset/c79c26819adc/
changeset:   c79c26819adc
user:        amercader
date:        2011-06-08 18:43:19
summary:     Add controller to save emails from users in a GDoc spreadsheet. TODO: integrate in the WUI. Also move the rewiring controller to the controllers module
affected #:  4 files (2.2 KB)

--- a/ckanext/pdeu/plugin.py	Tue Jun 07 21:04:45 2011 +0200
+++ b/ckanext/pdeu/plugin.py	Wed Jun 08 17:43:19 2011 +0100
@@ -1,21 +1,19 @@
 from ckan.plugins import implements, IRoutes, SingletonPlugin
 
-from ckan.lib.base import BaseController
-from ckan.lib.base import abort, redirect, h
 
-class RewiringController(BaseController):
-
-    def tag(self, tags):
-        redirect(h.url_for(controller='package', action='search', tags=tags))
-
-
-class DCatApi(SingletonPlugin):
+class PDEUCustomizations(SingletonPlugin):
     implements(IRoutes)
 
     def before_map(self, route_map):
-        wire_controller = "ckanext.pdeu.plugin:RewiringController"
-        route_map.connect("/tag/{tags}", controller=wire_controller,
-                          action="tag")
+        wire_controller = 'ckanext.pdeu.controllers:RewiringController'
+        route_map.connect('/tag/{tags}', controller=wire_controller,
+                          action='tag')
+
+        subscribe_controller = 'ckanext.pdeu.controllers:SubscribeController'
+        route_map.connect('/subscribe',
+                          controller=subscribe_controller,
+                          conditions=dict(method=['POST']),
+                          action='send')
 
         return route_map
 


--- a/pip-requirements.txt	Tue Jun 07 21:04:45 2011 +0200
+++ b/pip-requirements.txt	Wed Jun 08 17:43:19 2011 +0100
@@ -1,1 +1,3 @@
+gdata>=2.0.14
 -e hg+https://bitbucket.org/okfn/ckanext-rdf#egg=ckanext-rdf
+-e hg+https://bitbucket.org/okfn/datautil#egg=datautil


--- a/setup.py	Tue Jun 07 21:04:45 2011 +0200
+++ b/setup.py	Wed Jun 08 17:43:19 2011 +0100
@@ -26,6 +26,7 @@
 	"""
         [ckan.plugins]
 	# Add plugins here
+    pdeu_customizations=ckanext.pdeu.plugin:PDEUCustomizations
     ckan_pdeu_harvester=ckanext.pdeu.harvesters:PDEUCKANHarvester
 	data_publica_harvester=ckanext.pdeu.harvesters:DataPublicaHarvester
 	opengov_se_harvester=ckanext.pdeu.harvesters:OpenGovSeHarvester

Repository URL: https://bitbucket.org/okfn/ckanext-pdeu/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list