make the bbox param more self-documenting

This commit is contained in:
Schuyler Erle 2011-08-27 18:41:54 -07:00
commit 7a03aa238a

View File

@ -22,7 +22,7 @@ class FeatureSearchManager(models.GeoManager):
if text: if text:
text = text.replace("'", "''") # escape the ' text = text.replace("'", "''") # escape the '
# use the pg_trgm index # use the pg_trgm index
qset = qset.extra(where=["preferred_name %% '%s'" % text]) qset = qset.extra(where="[preferred_name %% '%s']" % text)
return qset return qset
class Feature(models.Model): class Feature(models.Model):
@ -37,7 +37,7 @@ class Feature(models.Model):
time_frame = models.ForeignKey("TimeFrame", null=True, blank=True) time_frame = models.ForeignKey("TimeFrame", null=True, blank=True)
relationships = models.ManyToManyField("Feature", through='Relationship', blank=True) relationships = models.ManyToManyField("Feature", through='Relationship', blank=True)
objects = models.GeoManager() objects = models.GeoManager()
search = models.FeatureSearchManager() search = FeatureSearchManager()
class Meta: class Meta:
ordering = ['preferred_name'] ordering = ['preferred_name']