fixed for stats_admin geo filtering
This commit is contained in:
@@ -209,9 +209,9 @@ def admin_stats(request):
|
|||||||
products_per_region = {}
|
products_per_region = {}
|
||||||
|
|
||||||
for region in Region.objects.all():
|
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
|
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
|
products_per_region[region.name] = count
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
|
|||||||
Reference in New Issue
Block a user