2024-05-31 09:57:15 +00:00
|
|
|
from django.core.management import BaseCommand
|
2024-06-08 06:57:14 +00:00
|
|
|
from fellchensammlung.models import Location
|
2024-05-31 09:57:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
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):
|
2024-06-08 06:57:14 +00:00
|
|
|
print(Location.get_location_from_string(options["query"]))
|