mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-21 18:31:08 -05:00
Sandbox URL Creation
This commit is contained in:
@@ -12,6 +12,7 @@ from django.db.models import Q
|
||||
|
||||
from location.forms import LocationForm
|
||||
from .models import Location
|
||||
from security import safe_requests
|
||||
|
||||
class LocationSearchView(View):
|
||||
"""
|
||||
@@ -51,7 +52,7 @@ class LocationSearchView(View):
|
||||
elif filter_type == 'city':
|
||||
params['featuretype'] = 'city'
|
||||
|
||||
response = requests.get(
|
||||
response = safe_requests.get(
|
||||
'https://nominatim.openstreetmap.org/search',
|
||||
params=params,
|
||||
headers={'User-Agent': 'ThrillWiki/1.0'},
|
||||
@@ -164,7 +165,7 @@ def reverse_geocode(request):
|
||||
return JsonResponse(cached_result)
|
||||
|
||||
try:
|
||||
response = requests.get(
|
||||
response = safe_requests.get(
|
||||
'https://nominatim.openstreetmap.org/reverse',
|
||||
params={
|
||||
'lat': lat,
|
||||
|
||||
Reference in New Issue
Block a user