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.
22 lines
522 B
22 lines
522 B
from django.core.management.base import BaseCommand, CommandError
|
|
from core.models import Player, Team, Season, Penelty
|
|
|
|
class Command(BaseCommand):
|
|
help = 'Populate database with csv stats.'
|
|
|
|
LOADING_FUNCTIONS = [
|
|
self.get_csvs,
|
|
self.load_csvs
|
|
]
|
|
|
|
def get_csvs(self):
|
|
pass
|
|
|
|
def load_csvs(self):
|
|
pass
|
|
|
|
def handle(self, *args, **kwargs):
|
|
self.stdout.write("Populating CSVs...")
|
|
self.load_csvs()
|
|
self.stdout.write(self.style.SUCCESS('Successfully populated CSV files into database.'))
|