def geo_filter(self, queryset, filters=None):

        filters = dict((k, filters[k]) for k in chain(self.D.UNITS.keys(), ["from"]) if k in filters)
        distance = dict((k, v) for k, v in filters.items() if k in self.D.UNITS.keys())
        if "from" in filters and len(filters["from"].split(",")) == 2:
            try:
                latitude, longitude = map(float, filters["from"].split(","))
                point = self.Point(longitude, latitude, srid=getattr(settings, "GEO_SRID", 4326))
                if point and distance:
                    major, minor, _ = haystack.__version__
                    if queryset.query.backend.__class__.__name__ == "ElasticsearchSearchBackend" \
                            and (major == 2 and minor < 4):
                        distance = self.unit_to_meters(self.D(**distance))  # pragma: no cover
                    else:
                        distance = self.D(**distance)
                    queryset = queryset.dwithin(self.point_field, point, distance).distance(self.point_field, point)
            except ValueError:
                raise ValueError("Cannot convert `from=latitude,longitude` query parameter to "
                                 "float values. Make sure to provide numerical values only!")

        return queryset
Builds the request for the ItemCreateSession
dataset/ETHPy150Open inonit/drf-haystack/drf_haystack/filters.py/BaseHaystackGEOSpatialFilter.geo_filter--crossover with--dataset/ETHPy150Open OneDrive/onedrive-sdk-python/src/python2/request/item_create_session.py/ItemCreateSessionRequestBuilder.request