from django.core.management.base import BaseCommand


class Command(BaseCommand):
    help = 'Download or refresh the DB-IP City Lite geo MMDB database'

    def handle(self, *args, **options):
        from nginxmon.geo import download_geo_db
        self.stdout.write('Downloading geo database...')
        download_geo_db()
        self.stdout.write(self.style.SUCCESS('Geo database downloaded successfully'))
