From 2da0ccbe7f5d31651f1292cc9072c003b5f83996 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 31 Aug 2011 17:35:34 +0530 Subject: [PATCH] change query param to q= --- gazetteer/places/views.py | 2 +- gazetteer/static/js/gazetteer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gazetteer/places/views.py b/gazetteer/places/views.py index a60e1cf..362c22f 100644 --- a/gazetteer/places/views.py +++ b/gazetteer/places/views.py @@ -9,7 +9,7 @@ def search(request): return render_to_response("search.html", d) def search_json(request): - search_term = request.GET.get("search", "") + search_term = request.GET.get("q", "") threshold = request.GET.get("threshold", 0.5) bbox = request.GET.get("bbox", False) country = request.GET.get("adm0", "US") # right now, unused diff --git a/gazetteer/static/js/gazetteer.js b/gazetteer/static/js/gazetteer.js index 79f02e8..843cb11 100644 --- a/gazetteer/static/js/gazetteer.js +++ b/gazetteer/static/js/gazetteer.js @@ -18,7 +18,7 @@ $(function() { var search_term = $('#search').val(); $.getJSON("/feature/search.json", { 'bbox': bbox, - 'search': search_term, + 'q': search_term, 'srid': 3785, 'threshold': 0.5 }, function(features) {