ordering
This commit is contained in:
@@ -279,10 +279,10 @@
|
||||
<th>Boat</th>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<th>Time</th>
|
||||
<th>Distance</th>
|
||||
<th>Time<a href="?order_by=duration">▼</th>
|
||||
<th>Distance<a href="?order_by=-distance">▼</th>
|
||||
{% if race.coursestandards %}
|
||||
<th>Points</th>
|
||||
<th>Points<a href="?order_by=-points">▼</a></th>
|
||||
{% endif %}
|
||||
<th>Details</th>
|
||||
<th> </th>
|
||||
|
||||
@@ -1159,7 +1159,6 @@ def virtualevent_view(request,id=0):
|
||||
if entrycategory is not None:
|
||||
results = results.filter(entrycategory__in=entrycategory)
|
||||
|
||||
|
||||
# to-do - add DNS
|
||||
dns = []
|
||||
if timezone.now() > race.evaluation_closure:
|
||||
@@ -1198,6 +1197,10 @@ def virtualevent_view(request,id=0):
|
||||
}
|
||||
]
|
||||
|
||||
orderby = request.GET.get('order_by')
|
||||
if orderby is not None:
|
||||
results = results.order_by(orderby)
|
||||
|
||||
racelogos = race.logos.all()
|
||||
|
||||
if racelogos:
|
||||
|
||||
Reference in New Issue
Block a user