better ordering on list view

This commit is contained in:
Tobias Brunner 2025-02-26 10:39:23 +01:00
parent efc5fefeb4
commit 67824483cb
No known key found for this signature in database
4 changed files with 21 additions and 12 deletions

View file

@ -6,6 +6,7 @@ from hub.services.models import ServiceOffering, CloudProvider, Category, Servic
def offering_list(request):
offerings = (
ServiceOffering.objects.all()
.order_by("service")
.select_related("service", "cloud_provider")
.prefetch_related(
"service__categories",