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

logic change

parent 2d72fce4
No related branches found
No related tags found
No related merge requests found
......@@ -9,8 +9,8 @@ $(function () {
html: true,
minLength: 2,
source: function (request, response) {
var url = ckan.SITE_ROOT + '/autocomplete';
$.getJSON(url, {q: request.term})
var url = ckan.SITE_ROOT + '/autocomplete/' + request.term;
$.getJSON(url)
.done(function (data) {
console.log(data);
response(data['result']);
......
......@@ -89,7 +89,7 @@ class OdshAutocompletePlugin(plugins.SingletonPlugin):
def before_map(self, map):
controller = 'ckanext.odsh.controller:OdshAutocompleteController'
map.connect('/autocomplete?q={q}', controller=controller, action='autocomplete')
map.connect('/autocomplete/{q}', controller=controller, action='autocomplete')
return map
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment