update to filter location for user

This commit is contained in:
Mohamed Nouffer
2023-01-20 17:18:07 +05:30
parent 743902b947
commit eed4b8810a
6 changed files with 3 additions and 3 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
rog/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -212,9 +212,9 @@ def ExtentForMainPerf(request):
@csrf_exempt
def ExtentForLocations(request):
user = request.user
grp = user.group[3:-1]
print(user.group)
locs = Location.objects.filter(group__contains=grp).aggregate(Extent('geom'), Union('geom'))
ec = user.event_code
//print(user.event_code)
locs = Location.objects.filter(group__contains=ec).aggregate(Extent('geom'), Union('geom'))
return JsonResponse(locs['geom__extent'], safe=False)

BIN
templates/.DS_Store vendored

Binary file not shown.