You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
529 B

from django.core.management.base import BaseCommand, CommandError
from core.models import Player, Team, Season, Penelty
class Command(BaseCommand):
help = 'Populate database with teams from a CSV.'
def load_teams(self):
pass
# TODO: find way to add argument
def add_argument(self, parser):
pass
def handle(self, *args, **kwargs):
self.stdout.write("Populating teams...")
self.load_teams()
print(kwargs["csv_file"])
self.stdout.write(self.style.SUCCESS('Successfully populate teams from {}.'))