22 lines
609 B
Python
22 lines
609 B
Python
from django.core.management.base import BaseCommand, CommandError
|
|
|
|
import astropy
|
|
|
|
from artsurvey.models import ArtSurveySource, ArtSurvey, EnergyBand
|
|
|
|
|
|
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):
|
|
|
|
filename='/export/django/srg/data/artsurvey/catalog.csv'
|
|
data = astropy.table.Table.read(filename,format='ascii.csv',delimiter=',')
|
|
print(data.info)
|
|
|
|
self.stdout.write(self.style.SUCCESS('Done'))
|
|
|