Order homepage sessions from newest
This commit is contained in:
parent
b45889fd85
commit
6790c434f7
|
@ -87,7 +87,7 @@ def list_sessions(request, filter="", purchase_id="", platform_id="", game_id=""
|
||||||
elif filter == "recent":
|
elif filter == "recent":
|
||||||
dataset = Session.objects.filter(
|
dataset = Session.objects.filter(
|
||||||
timestamp_start__gte=datetime.now() - timedelta(days=30)
|
timestamp_start__gte=datetime.now() - timedelta(days=30)
|
||||||
)
|
).order_by("-timestamp_start")
|
||||||
context["title"] = "Last 30 days"
|
context["title"] = "Last 30 days"
|
||||||
else:
|
else:
|
||||||
# by default, sort from newest to oldest
|
# by default, sort from newest to oldest
|
||||||
|
|
Loading…
Reference in New Issue