Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Quiet-Klirik committed Aug 14, 2023
1 parent 12d46bf commit 754c1af
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions taxi/views.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
from django.contrib.auth import get_user_model
from django.http import HttpResponse
from django.shortcuts import render

from taxi import models
from taxi.models import Manufacturer, Car


def index(request):
num_drivers = models.Driver.objects.count()
num_manufacturers = models.Manufacturer.objects.count()
num_cars = models.Car.objects.count()
num_drivers = get_user_model().objects.count()
num_manufacturers = Manufacturer.objects.count()
num_cars = Car.objects.count()
context = {
"num_drivers": num_drivers,
"num_manufacturers": num_manufacturers,
Expand Down

0 comments on commit 754c1af

Please sign in to comment.