From 195e8b3931530bfe2db941c119975323d0624d44 Mon Sep 17 00:00:00 2001 From: Sanj Date: Sun, 28 Aug 2011 06:50:30 +0530 Subject: [PATCH] line 20 syntax error fixed --- gazetteer/places/models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gazetteer/places/models.py b/gazetteer/places/models.py index 8b730c6..1257507 100644 --- a/gazetteer/places/models.py +++ b/gazetteer/places/models.py @@ -17,9 +17,7 @@ class FeatureSearchManager(manager.GeoManager): cursor.execute("""SELECT set_limit(%f)""" % threshold) def overlaps(self, bbox, text=None): - bbox = 'POLYGON(((%f %f, %f %f, %f %f, %f %f, %f %f)))' % - (bbox[0], bbox[1], bbox[2], bbox[1], bbox[2], bbox[3], - bbox[0], bbox[3], bbox[0], bbox[1]) + bbox = 'POLYGON(((%f %f, %f %f, %f %f, %f %f, %f %f)))' % (bbox[0], bbox[1], bbox[2], bbox[1], bbox[2], bbox[3], bbox[0], bbox[3], bbox[0], bbox[1]) qset = super(FeatureSearchManager, self).get_query_set().filter(geometry_bboverlaps=bbox) if text: text = text.replace("'", "''") # escape the '