update location filter for sight seeing
This commit is contained in:
@ -140,9 +140,9 @@ def LocationInBound(request):
|
|||||||
locs = Location.objects.filter(~Q(cp=0), geom__within=pl, category=cat, event_name__isnull=True)
|
locs = Location.objects.filter(~Q(cp=0), geom__within=pl, category=cat, event_name__isnull=True)
|
||||||
else:
|
else:
|
||||||
if grp:
|
if grp:
|
||||||
locs = Location.objects.filter(geom__within=pl, category=cat, event_name__isnull=True, group__contains=grp)
|
locs = Location.objects.filter(geom__within=pl, category=cat, event_name__isnull=True, group__contains=grp, location_name__contains='観光')
|
||||||
else:
|
else:
|
||||||
locs = Location.objects.filter(geom__within=pl, category=cat, event_name__isnull=True)
|
locs = Location.objects.filter(geom__within=pl, category=cat, event_name__isnull=True, location_name__contains='観光')
|
||||||
else:
|
else:
|
||||||
if is_rog:
|
if is_rog:
|
||||||
if grp:
|
if grp:
|
||||||
@ -151,9 +151,9 @@ def LocationInBound(request):
|
|||||||
locs = Location.objects.filter(~Q(cp=0), geom__within=pl, event_name__isnull=True)
|
locs = Location.objects.filter(~Q(cp=0), geom__within=pl, event_name__isnull=True)
|
||||||
else:
|
else:
|
||||||
if grp:
|
if grp:
|
||||||
locs = Location.objects.filter(geom__within=pl, event_name__isnull=True, group__contains=grp)
|
locs = Location.objects.filter(geom__within=pl, event_name__isnull=True, group__contains=grp, location_name__contains='観光')
|
||||||
else:
|
else:
|
||||||
locs = Location.objects.filter(geom__within=pl, event_name__isnull=True)
|
locs = Location.objects.filter(geom__within=pl, event_name__isnull=True, location_name__contains='観光')
|
||||||
if len(locs) > 50:
|
if len(locs) > 50:
|
||||||
return JsonResponse({"too_many_points": True}, safe=False, status=500)
|
return JsonResponse({"too_many_points": True}, safe=False, status=500)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user