Skip to content

Commit

Permalink
solution
Browse files Browse the repository at this point in the history
  • Loading branch information
sashabryl committed Sep 25, 2023
1 parent 5d4eb0d commit 8479454
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions taxi/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
@login_required
def index(request):
"""View function for the home page of the site."""
num_visited = request.session.get("num_visited", 0) + 1
request.session["num_visited"] = num_visited
num_visits = request.session.get("num_visits", 0) + 1
request.session["num_visits"] = num_visits
num_drivers = Driver.objects.count()
num_cars = Car.objects.count()
num_manufacturers = Manufacturer.objects.count()
Expand All @@ -19,7 +19,7 @@ def index(request):
"num_drivers": num_drivers,
"num_cars": num_cars,
"num_manufacturers": num_manufacturers,
"num_visited": num_visited,
"num_visits": num_visits,
}

return render(request, "taxi/index.html", context=context)
Expand Down

0 comments on commit 8479454

Please sign in to comment.