This file contains hidden or 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
""" | |
Find user/database entries within a km radius based on long/lat co-ords. | |
i.e. return all objects where longlat lies within 10km of my current long/lat. | |
Using with Django REST Framework but approach is same for any similar req. | |
""" | |
import math | |
def get_queryset(self): | |
user = self.request.user | |
lat = self.request.query_params.get('lat', None) |