GeoDjango & SpatiaLite - filtering nearby objects
问题 My models.py has User and Business models that have this field: location = PointField(geography=True) I'm getting Google Maps coordinates (in EPSG 4326 ) via Geocode service from an address which the user specifies. Then I'm saving it in the above field (also EPSG 4326 ). Now, what I want is to get all Business objects within a specified radius (of 1km for example), based on the user location: Business.gis.filter(location__distance_lt=(request.user.location, D(km=1))) But it doesn't work, it