srg/artsurvey/management/commands/00_artsurvey_find_skymaps.py
2024-04-26 12:43:00 +03:00

34 lines
762 B
Python

from django.core.management.base import BaseCommand, CommandError
from datetime import date
import datetime
from django.utils import timezone
import astropy
from astropy.io import ascii
import pandas as pd
import pymysql
from sqlalchemy import create_engine
from django.db.models import Q
from heasarc.models import HeasarcBase
from artsurvey.models import ArtSurveySource, ArtSurvey
from artsurvey.models import EnergyBand
from artsurvey.utils import find_skymaps
class Command(BaseCommand):
help = 'Initiates data dase'
# def add_arguments(self, parser):
# parser.add_argument('poll_id', nargs='+', type=int)
def handle(self, *args, **options):
find_skymaps()
self.stdout.write(self.style.SUCCESS('Done'))