diff --git a/db.sqlite3 b/db.sqlite3 index 08853bb1..37566a5a 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/taxi/urls.py b/taxi/urls.py index abdd95d1..6599e458 100644 --- a/taxi/urls.py +++ b/taxi/urls.py @@ -24,8 +24,6 @@ path( "drivers//", 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)