make the bbox param more self-documenting
This commit is contained in:
commit
7a03aa238a
|
@ -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):
|
||||
|
@ -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']
|
||||
|
|
Loading…
Reference in New Issue
Block a user