From cc0e7e4ae663e2268663c69a1e84b38676513a6d Mon Sep 17 00:00:00 2001 From: Sanj Date: Sun, 28 Aug 2011 07:00:10 +0530 Subject: [PATCH 1/2] fixed line 25, resolved conflict. --- gazetteer/places/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gazetteer/places/models.py b/gazetteer/places/models.py index d68a911..36bd8dc 100644 --- a/gazetteer/places/models.py +++ b/gazetteer/places/models.py @@ -22,7 +22,7 @@ class FeatureSearchManager(models.GeoManager): if text: text = text.replace("'", "''") # escape the ' # use the pg_trgm index - qset = qset.extra(where=["preferred_name %% '%s'" % text]) + qset = qset.extra(where="[preferred_name %% '%s']" % text) return qset class Feature(models.Model): From 640b59825a772591f7bbf766ba4440ab899db605 Mon Sep 17 00:00:00 2001 From: Sanj Date: Sun, 28 Aug 2011 07:05:55 +0530 Subject: [PATCH 2/2] :) --- gazetteer/places/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gazetteer/places/models.py b/gazetteer/places/models.py index 36bd8dc..77cbf3c 100644 --- a/gazetteer/places/models.py +++ b/gazetteer/places/models.py @@ -37,7 +37,7 @@ class Feature(models.Model): time_frame = models.ForeignKey("TimeFrame", null=True, blank=True) relationships = models.ManyToManyField("Feature", through='Relationship', blank=True) objects = models.GeoManager() - search = models.FeatureSearchManager() + search = FeatureSearchManager() class Meta: ordering = ['preferred_name']