This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple version of Django queryset for objects within X long/lat radius | |
import math | |
def get_queryset(self): | |
user = self.request.user | |
lat = self.request.query_params.get('lat', None) | |
lon = self.request.query_params.get('long', None) | |
if lat and lon: | |
lat = float(lat) |