Order locations by scrobble timestmap

This commit is contained in:
2023-11-27 18:49:24 +01:00
parent 5aa155094f
commit 7564292f5b
3 changed files with 147 additions and 3 deletions

View File

@ -9,7 +9,7 @@ class GeoLocationListView(generic.ListView):
paginate_by = 75
def get_queryset(self):
return super().get_queryset().filter(scrobble__user_id=self.request.user.id).order_by("-created")
return super().get_queryset().filter(scrobble__user_id=self.request.user.id).order_by("-scrobble__timestamp")
def get_context_data(self, **kwargs):
context_data = super().get_context_data(**kwargs)