diff --git a/rowers/views/racesviews.py b/rowers/views/racesviews.py index 451d7184..b74651be 100644 --- a/rowers/views/racesviews.py +++ b/rowers/views/racesviews.py @@ -16,6 +16,8 @@ def howfaris(lat_lon,course): return distance +whatisnear = 150 + # get nearest races def getnearestraces(lat_lon,races): newlist = [] @@ -27,7 +29,7 @@ def getnearestraces(lat_lon,races): c = race.course coords = c.coord distance = howfaris(lat_lon,c) - if distance < 100: + if distance < whatisnear: newlist.append(race) counter += 1 @@ -39,7 +41,7 @@ def getnearestraces(lat_lon,races): orders = sorted(orders,key = lambda tup:tup[1]) ids = [id for id,distance in orders[0:4]] for id, distance in orders[5:]: - if distance<100: + if distance