From a7c91df3f3a403ffb8b015e14db90f462c3d71d5 Mon Sep 17 00:00:00 2001 From: Misha Shushman Date: Wed, 8 Nov 2023 21:32:48 +0200 Subject: [PATCH] Fixes --- taxi/urls.py | 1 - taxi/views.py | 2 +- taxi_service/urls.py | 1 + templates/includes/sidebar.html | 4 ++-- templates/registration/logged_out.html | 2 +- templates/registration/login.html | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/taxi/urls.py b/taxi/urls.py index d5ac4f64..bbb16a09 100644 --- a/taxi/urls.py +++ b/taxi/urls.py @@ -22,7 +22,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 dcece1b1..08dc34d6 100644 --- a/taxi/views.py +++ b/taxi/views.py @@ -13,7 +13,7 @@ def index(request): num_drivers = Driver.objects.count() num_cars = Car.objects.count() num_manufacturers = Manufacturer.objects.count() - num_visits = request.session.get("num_visits", 0) + num_visits = request.session.get("num_visits", 1) request.session["num_visits"] = num_visits + 1 context = { diff --git a/taxi_service/urls.py b/taxi_service/urls.py index 8b94449f..5d781485 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) diff --git a/templates/includes/sidebar.html b/templates/includes/sidebar.html index b38204b6..2de7dbcb 100644 --- a/templates/includes/sidebar.html +++ b/templates/includes/sidebar.html @@ -1,9 +1,9 @@