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