I'm using mysql 5.1.50, so the distance QuerySet method is not available to me.
Here is my model:
class Location(models.Model):
name = models.CharField(max_length='100')
point = models.PointField(spatial_index=False)
objects = models.GeoManager()
I would like to find all the locations where the point is within 5 miles of another point (eg. test_point). I've found some potential ways to do this but am unsure of all of them.
Location.objects.filter(point__within=test_point.buffer(1))
But it's not clear to me what the unit is for '1'. It looks like degrees. I can convert miles to degrees but it seems like there's a cleaner way to do this.