35 lines
915 B
Python
35 lines
915 B
Python
from django.core.management.base import BaseCommand, CommandError
|
|
|
|
from datetime import date
|
|
from django.utils import dateparse
|
|
from logbook.models import LogBookPlan, LogBookDay
|
|
from plan.models import INPUT_DATA_DIR
|
|
from plan.models import LaunchDate
|
|
from django.contrib.auth.models import User
|
|
|
|
from monthplan.models import Head, Observation, Seance, Correction, Scan, Survey, FlightPlan
|
|
|
|
from astropy.io import fits
|
|
|
|
import datetime
|
|
from django.utils import timezone
|
|
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = 'Initiates data base'
|
|
|
|
# def add_arguments(self, parser):
|
|
# parser.add_argument('poll_id', nargs='+', type=int)
|
|
|
|
def handle(self, *args, **options):
|
|
user = User.objects.get(id=2)
|
|
user_email = user.email
|
|
print(user_email)
|
|
emails = []
|
|
users = User.objects.all()
|
|
for user in users:
|
|
emails.append(user.email)
|
|
print(emails)
|
|
|