diff --git a/core/views.py b/core/views.py index 8568d00..ac62e81 100644 --- a/core/views.py +++ b/core/views.py @@ -209,9 +209,9 @@ def admin_stats(request): products_per_region = {} for region in Region.objects.all(): - count = Company.objects.filter(geo__dwithin=region.geo).count() + count = Company.objects.filter(geo__within=region.geo).count() companies_per_region[region.name] = count - count = Product.objects.filter(company__geo__dwithin=region.geo).count() + count = Product.objects.filter(company__geo__within=region.geo).count() products_per_region[region.name] = count data = {