line 20 syntax error fixed

This commit is contained in:
Sanj 2011-08-28 06:50:30 +05:30
parent a6dfee7375
commit 195e8b3931

View File

@ -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 '