Skip to content
Snippets Groups Projects
Commit b9bd7feb authored by anonymous's avatar anonymous
Browse files

init autocomplete

parent 2f1793db
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@ from ckanext.dcat.controllers import DCATController
abort = base.abort
log = logging.getLogger(__name__)
class OdshRouteController(HomeController):
def info_page(self):
h.redirect_to('http://www.schleswig-holstein.de/odpinfo')
......@@ -27,6 +28,7 @@ class OdshRouteController(HomeController):
def not_found(self):
abort(404)
class OdshUserController(UserController):
def me(self, locale=None):
if not c.user:
......@@ -63,9 +65,11 @@ class OdshUserController(UserController):
abort(404)
return super(OdshUserController,self).activity(id, offset)
class OdshPackageController(PackageController):
pass
class OdshApiController(ApiController):
def action(self, logic_function, ver=None):
try:
......@@ -91,11 +95,13 @@ class OdshApiController(ApiController):
return ApiController.action(self, logic_function, ver)
class OdshDCATController(DCATController):
def read_catalog(self, _format):
matomo.create_matomo_request()
return DCATController.read_catalog(self,_format)
class OdshFeedController(FeedController):
def custom(self):
matomo.create_matomo_request()
......@@ -153,3 +159,8 @@ class OdshFeedController(FeedController):
feed_guid=_create_atom_id(atom_url),
feed_url=feed_url,
navigation_urls=navigation_urls)
class OdshAutocompleteController(ApiController):
def autocomplete(self):
base.response.body_file.write("Hello World")
......@@ -76,12 +76,22 @@ def remove_route(map,routename):
map._routenames.pop(route.name)
break
class OdshIcapPlugin(plugins.SingletonPlugin):
plugins.implements(plugins.IUploader, inherit=True)
def get_resource_uploader(self, data_dict):
return ODSHResourceUpload(data_dict)
class OdshAutocompletePlugin(plugins.SingletonPlugin):
plugins.implements(plugins.IRoutes, inherit=True)
def before_map(self, map):
controller = 'ckanext.odsh.controller:OdshAutocompleteController'
map.connect('/autocomplete', controller=controller, action='autocomplete')
class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm):
plugins.implements(plugins.IConfigurer)
plugins.implements(plugins.ITemplateHelpers)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment