feat: Add management command to quickly test geocoding
This commit is contained in:
parent
0e05201f5a
commit
7291e26140
17
src/fellchensammlung/management/commands/query_location.py
Normal file
17
src/fellchensammlung/management/commands/query_location.py
Normal file
@ -0,0 +1,17 @@
|
||||
from django.core.management import BaseCommand
|
||||
from fellchensammlung.tools.geo import GeoAPI
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Query location data to debug'
|
||||
|
||||
def add_arguments(self, parser):
|
||||
# Named (optional) arguments
|
||||
parser.add_argument(
|
||||
"query",
|
||||
help="The string to query",
|
||||
)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
geo_api = GeoAPI(debug=False)
|
||||
print(geo_api.get_location_from_string(options["query"]))
|
Loading…
Reference in New Issue
Block a user