From 99bfff0c365284e8dbc3391c0e1a8efba70829f9 Mon Sep 17 00:00:00 2001 From: Volodymyr Yablonskyi Date: Wed, 4 Dec 2024 23:02:12 +0200 Subject: [PATCH] Fixed the tests --- db.sqlite3 | Bin 176128 -> 176128 bytes taxi/urls.py | 2 -- taxi/views.py | 2 +- taxi_service/urls.py | 1 + 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/db.sqlite3 b/db.sqlite3 index 08853bb1132e26676a83f60904ea1841cb48476a..37566a5ae1fab3676f101d06792800812c007e14 100644 GIT binary patch delta 349 zcmX}i%}#=F008jGp*h#q1Jt2YHymGozBb#C0+fId1>~Z96e=JBD(XdR>s}|f9-({l z*cLf$b06F~LLTBjt$^Pk>LO0cm X)5KZ8)KNf^B)0$ALfpYzL0{A#9V2cI delta 348 zcmX}gyH3JT002klu33y={U?p%2SA)Hvp*H~r^4%1PJ6qq=d|a+%OLkTAed_I?C@SCN;^K$GmkUcy6s9q zVA)Mke;8qFAp&IJZ6jE!LTxUV1=kk?zO|(nK+Gg_oG}Wldo!gMa?oxJ1w5hyiIKGp z>Z#pkf-OsS/", DriverDetailView.as_view(), name="driver-detail" ), - path("accounts/", include("django.contrib.auth.urls")), - ] app_name = "taxi" diff --git a/taxi/views.py b/taxi/views.py index ab4b9766..1b678971 100644 --- a/taxi/views.py +++ b/taxi/views.py @@ -36,7 +36,7 @@ class ManufacturerListView(LoginRequiredMixin, generic.ListView): class CarListView(LoginRequiredMixin, generic.ListView): model = Car paginate_by = 5 - queryset = Car.objects.select_related("manufacturer") + queryset = Car.objects.select_related("manufacturer").order_by("id") class CarDetailView(LoginRequiredMixin, generic.DetailView): diff --git a/taxi_service/urls.py b/taxi_service/urls.py index 8b94449f..baf83d1a 100644 --- a/taxi_service/urls.py +++ b/taxi_service/urls.py @@ -22,4 +22,5 @@ urlpatterns = [ path("admin/", admin.site.urls), path("", include("taxi.urls", namespace="taxi")), + path("accounts/", include("django.contrib.auth.urls")), ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)