1👍
✅
The way i understood your question, you may want to get the maximum distance in meters that produce the same result as the current distance (say m
meters):
next_number = People.objects.filter(meters_away__gte=m).order_by('meters_away')[:1]
next_number = next_number[0] if next_number else m
and the canonical url will be:
http://example.com/range/<next_number>
Source:stackexchange.com