From 04bed12052075162f6af72029b0f742b15becb11 Mon Sep 17 00:00:00 2001 From: Sanj Date: Sun, 28 Aug 2011 08:52:09 +0530 Subject: [PATCH] pass params properly, pass srid --- gazetteer/places/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gazetteer/places/views.py b/gazetteer/places/views.py index d5c044f..f39f25f 100644 --- a/gazetteer/places/views.py +++ b/gazetteer/places/views.py @@ -15,8 +15,9 @@ def search_json(request): return render_to_json_response({'error': 'no bbox parameter'}) bs = bbox.split(",") - bs_param = (float(bs[0]), float(bs[1]), float(bs[2]), float(bs[3])) - features = Feature.search.overlaps(bs_param, search_term) + bs_param = (float(bs[0]), float(bs[1]), float(bs[2]), float(bs[3]),) + + features = Feature.search.overlaps(bs_param, text=search_term, srid=3785) d = {'c': features.count()} return render_to_json_response(d)