diff --git a/accounts/__init__.py b/accounts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accounts/__pycache__/__init__.cpython-37.pyc b/accounts/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..373db8e Binary files /dev/null and b/accounts/__pycache__/__init__.cpython-37.pyc differ diff --git a/accounts/__pycache__/admin.cpython-37.pyc b/accounts/__pycache__/admin.cpython-37.pyc new file mode 100644 index 0000000..3d8b335 Binary files /dev/null and b/accounts/__pycache__/admin.cpython-37.pyc differ diff --git a/accounts/__pycache__/apps.cpython-37.pyc b/accounts/__pycache__/apps.cpython-37.pyc new file mode 100644 index 0000000..01c30ee Binary files /dev/null and b/accounts/__pycache__/apps.cpython-37.pyc differ diff --git a/accounts/__pycache__/models.cpython-37.pyc b/accounts/__pycache__/models.cpython-37.pyc new file mode 100644 index 0000000..da81496 Binary files /dev/null and b/accounts/__pycache__/models.cpython-37.pyc differ diff --git a/accounts/admin.py b/accounts/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/accounts/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/accounts/apps.py b/accounts/apps.py new file mode 100644 index 0000000..3e3c765 --- /dev/null +++ b/accounts/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AccountsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'accounts' diff --git a/accounts/migrations/0001_initial.py b/accounts/migrations/0001_initial.py new file mode 100644 index 0000000..57ad8ef --- /dev/null +++ b/accounts/migrations/0001_initial.py @@ -0,0 +1,32 @@ +# Generated by Django 3.2.13 on 2022-05-04 18:30 + +import django.contrib.auth.models +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('auth', '0012_alter_user_first_name_max_length'), + ] + + operations = [ + migrations.CreateModel( + name='HockeyUser', + fields=[ + ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='auth.user')), + ], + options={ + 'verbose_name': 'user', + 'verbose_name_plural': 'users', + 'abstract': False, + }, + bases=('auth.user',), + managers=[ + ('objects', django.contrib.auth.models.UserManager()), + ], + ), + ] diff --git a/accounts/migrations/__init__.py b/accounts/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accounts/migrations/__pycache__/0001_initial.cpython-37.pyc b/accounts/migrations/__pycache__/0001_initial.cpython-37.pyc new file mode 100644 index 0000000..6074469 Binary files /dev/null and b/accounts/migrations/__pycache__/0001_initial.cpython-37.pyc differ diff --git a/accounts/migrations/__pycache__/__init__.cpython-37.pyc b/accounts/migrations/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..9728832 Binary files /dev/null and b/accounts/migrations/__pycache__/__init__.cpython-37.pyc differ diff --git a/accounts/models.py b/accounts/models.py new file mode 100644 index 0000000..a9b565e --- /dev/null +++ b/accounts/models.py @@ -0,0 +1,8 @@ +from django.contrib.auth.models import User +from django.db import models + +# Create your models here. +class HockeyUser(User): + pass + def __str__(self): + return f"{self.username}" diff --git a/accounts/tests.py b/accounts/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/accounts/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/accounts/views.py b/accounts/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/accounts/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/core/__init__.py b/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/__pycache__/__init__.cpython-37.pyc b/core/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..5fdc32d Binary files /dev/null and b/core/__pycache__/__init__.cpython-37.pyc differ diff --git a/core/__pycache__/admin.cpython-37.pyc b/core/__pycache__/admin.cpython-37.pyc new file mode 100644 index 0000000..172fad3 Binary files /dev/null and b/core/__pycache__/admin.cpython-37.pyc differ diff --git a/core/__pycache__/apps.cpython-37.pyc b/core/__pycache__/apps.cpython-37.pyc new file mode 100644 index 0000000..f20d4c0 Binary files /dev/null and b/core/__pycache__/apps.cpython-37.pyc differ diff --git a/core/__pycache__/models.cpython-37.pyc b/core/__pycache__/models.cpython-37.pyc new file mode 100644 index 0000000..59df9f9 Binary files /dev/null and b/core/__pycache__/models.cpython-37.pyc differ diff --git a/core/admin.py b/core/admin.py new file mode 100644 index 0000000..727c8e0 --- /dev/null +++ b/core/admin.py @@ -0,0 +1,33 @@ +from .models import Player, Team, Season, Goal, Game, Division +from django.contrib import admin + +# Register your models here. +@admin.register(Player) +class PlayerAdmin(admin.ModelAdmin): + list_display = ["last_name", "first_name"] + search_fields = ["last_name", "first_name"] + +@admin.register(Season) +class SeasonAdmin(admin.ModelAdmin): + list_display = ["name", "start_date", "end_date"] + list_display = ["name", "start_date", "end_date"] + +@admin.register(Game) +class GameAdmin(admin.ModelAdmin): + list_display = ["name", "home_team", "away_team", "date_of", "time_of"] + search_fields = ["name", "home_team", "away_team", "date_of", "time_of"] + +@admin.register(Goal) +class GoalAdmin(admin.ModelAdmin): + list_display = ["game", "scorer"] + search_fields = ["game", "scorer"] + +@admin.register(Team) +class TeamAdmin(admin.ModelAdmin): + list_display = ["name", "season"] + search_fields = ["name", "season"] + +@admin.register(Division) +class DivisionAdmin(admin.ModelAdmin): + list_display = ["name"] + search_fields = ["name"] diff --git a/core/apps.py b/core/apps.py new file mode 100644 index 0000000..8115ae6 --- /dev/null +++ b/core/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class CoreConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'core' diff --git a/core/management/commands/__pycache__/add_teams.cpython-37.pyc b/core/management/commands/__pycache__/add_teams.cpython-37.pyc new file mode 100644 index 0000000..2c3b904 Binary files /dev/null and b/core/management/commands/__pycache__/add_teams.cpython-37.pyc differ diff --git a/core/management/commands/add_teams.py b/core/management/commands/add_teams.py new file mode 100644 index 0000000..e6e70d1 --- /dev/null +++ b/core/management/commands/add_teams.py @@ -0,0 +1,18 @@ +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 {}.')) diff --git a/core/management/commands/init_db.py b/core/management/commands/init_db.py new file mode 100644 index 0000000..60efb09 --- /dev/null +++ b/core/management/commands/init_db.py @@ -0,0 +1,21 @@ +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.')) diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..cdb6b64 --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,83 @@ +# Generated by Django 3.2.13 on 2022-05-04 19:20 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Division', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=64)), + ], + ), + migrations.CreateModel( + name='Game', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('_name', models.CharField(blank=True, max_length=64, null=True)), + ('date_of', models.DateField()), + ('time_of', models.TimeField(blank=True, null=True)), + ], + ), + migrations.CreateModel( + name='Season', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=32)), + ('start_date', models.DateField(blank=True, null=True)), + ('end_date', models.DateField(blank=True, null=True)), + ], + ), + migrations.CreateModel( + name='Team', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=32)), + ('division', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='teams', to='core.division')), + ('season', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='teams', to='core.season')), + ], + ), + migrations.CreateModel( + name='Player', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('first_name', models.CharField(blank=True, max_length=32)), + ('last_name', models.CharField(max_length=32)), + ('middle_names', models.CharField(blank=True, max_length=64)), + ('teams', models.ManyToManyField(blank=True, related_name='players', to='core.Team')), + ], + ), + migrations.CreateModel( + name='Goal', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('assists', models.ManyToManyField(blank=True, related_name='assists', to='core.Player')), + ('game', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='goals', to='core.game')), + ('scorer', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='goals', to='core.player')), + ], + ), + migrations.AddField( + model_name='game', + name='away_team', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='away_games', to='core.team'), + ), + migrations.AddField( + model_name='game', + name='home_team', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='home_games', to='core.team'), + ), + migrations.AddField( + model_name='game', + name='season', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='games', to='core.season'), + ), + ] diff --git a/core/migrations/0002_auto_20220504_2124.py b/core/migrations/0002_auto_20220504_2124.py new file mode 100644 index 0000000..65e3f13 --- /dev/null +++ b/core/migrations/0002_auto_20220504_2124.py @@ -0,0 +1,32 @@ +# Generated by Django 3.2.13 on 2022-05-04 21:24 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='goal', + name='period', + field=models.IntegerField(choices=[(1, '1st'), (2, '2nd'), (3, '3rd'), (4, 'OT'), (5, '2OT'), (6, '3OT'), (7, '4OT'), (8, '5OT'), (9, '6OT'), (0, 'SO')], default=1), + ), + migrations.AddField( + model_name='goal', + name='time', + field=models.DurationField(blank=True, null=True), + ), + migrations.CreateModel( + name='Shot', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('game', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='shots', to='core.game')), + ('shooter', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='shots', to='core.player')), + ], + ), + ] diff --git a/core/migrations/0003_auto_20220504_2125.py b/core/migrations/0003_auto_20220504_2125.py new file mode 100644 index 0000000..498f8b7 --- /dev/null +++ b/core/migrations/0003_auto_20220504_2125.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.13 on 2022-05-04 21:25 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0002_auto_20220504_2124'), + ] + + operations = [ + migrations.AddField( + model_name='shot', + name='period', + field=models.IntegerField(choices=[(1, '1st'), (2, '2nd'), (3, '3rd'), (4, 'OT'), (5, '2OT'), (6, '3OT'), (7, '4OT'), (8, '5OT'), (9, '6OT'), (0, 'SO')], default=1), + ), + migrations.AddField( + model_name='shot', + name='time', + field=models.DurationField(blank=True, null=True), + ), + ] diff --git a/core/migrations/0004_rename_shot_shotongoal.py b/core/migrations/0004_rename_shot_shotongoal.py new file mode 100644 index 0000000..1e47163 --- /dev/null +++ b/core/migrations/0004_rename_shot_shotongoal.py @@ -0,0 +1,17 @@ +# Generated by Django 3.2.13 on 2022-05-04 22:59 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0003_auto_20220504_2125'), + ] + + operations = [ + migrations.RenameModel( + old_name='Shot', + new_name='ShotOnGoal', + ), + ] diff --git a/core/migrations/0005_rename_shotongoal_shot.py b/core/migrations/0005_rename_shotongoal_shot.py new file mode 100644 index 0000000..44ca144 --- /dev/null +++ b/core/migrations/0005_rename_shotongoal_shot.py @@ -0,0 +1,17 @@ +# Generated by Django 3.2.13 on 2022-05-04 22:59 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0004_rename_shot_shotongoal'), + ] + + operations = [ + migrations.RenameModel( + old_name='ShotOnGoal', + new_name='Shot', + ), + ] diff --git a/core/migrations/0006_auto_20220504_2306.py b/core/migrations/0006_auto_20220504_2306.py new file mode 100644 index 0000000..53b95c4 --- /dev/null +++ b/core/migrations/0006_auto_20220504_2306.py @@ -0,0 +1,34 @@ +# Generated by Django 3.2.13 on 2022-05-04 23:06 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0005_rename_shotongoal_shot'), + ] + + operations = [ + migrations.AddField( + model_name='goal', + name='goalie', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='goals_on', to='core.player'), + ), + migrations.AddField( + model_name='shot', + name='blocker', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='blocked_shots', to='core.player'), + ), + migrations.AddField( + model_name='shot', + name='goalie', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='shots_on', to='core.player'), + ), + migrations.AddField( + model_name='shot', + name='shot_type', + field=models.CharField(choices=[('O', 'On Goal'), ('M', 'Missed'), ('B', 'Blocked')], default='O', max_length=1), + ), + ] diff --git a/core/migrations/0007_penelty_peneltylength_peneltytype.py b/core/migrations/0007_penelty_peneltylength_peneltytype.py new file mode 100644 index 0000000..18d6cd6 --- /dev/null +++ b/core/migrations/0007_penelty_peneltylength_peneltytype.py @@ -0,0 +1,45 @@ +# Generated by Django 3.2.13 on 2022-05-04 23:42 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0006_auto_20220504_2306'), + ] + + operations = [ + migrations.CreateModel( + name='PeneltyLength', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(choices=[('M', 'Minor'), ('D', 'Double Minor'), ('J', 'Major'), ('C', 'Misconduct'), ('G', 'Game Misconduct'), ('S', 'Shot')], max_length=1)), + ('length', models.DurationField()), + ], + ), + migrations.CreateModel( + name='PeneltyType', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(choices=[('B', 'Boarding'), ('C', 'Charging'), ('D', 'Delay of Game'), ('X', 'Cross-Checking'), ('E', 'Elbowing'), ('G', 'Grasping the Facemask'), ('H', 'High Sticking'), ('O', 'Holding'), ('K', 'Hooking'), ('I', 'Interference'), ('M', 'Miscounduct'), ('R', 'Roughing'), ('S', 'Slashing'), ('P', 'Spearing'), ('T', 'Tripping'), ('U', 'Unsportsmanlike Conduct')], max_length=1)), + ], + ), + migrations.CreateModel( + name='Penelty', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('penelty_classification', models.CharField(choices=[('I', 'Individual'), ('T', 'Team')], default='I', max_length=1)), + ('period', models.IntegerField(choices=[(1, '1st'), (2, '2nd'), (3, '3rd'), (4, 'OT'), (5, '2OT'), (6, '3OT'), (7, '4OT'), (8, '5OT'), (9, '6OT'), (0, 'SO')])), + ('time', models.DurationField()), + ('drawn_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='penelties_drawn', to='core.player')), + ('game', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='penelties', to='core.game')), + ('on_ind', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='penelties_given', to='core.player')), + ('on_team', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='penelties_given', to='core.team')), + ('penelty_length', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='given_out', to='core.peneltylength')), + ('penelty_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='given_out', to='core.peneltytype')), + ('served_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='penelties_served', to='core.player')), + ], + ), + ] diff --git a/core/migrations/__init__.py b/core/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/migrations/__pycache__/0001_initial.cpython-37.pyc b/core/migrations/__pycache__/0001_initial.cpython-37.pyc new file mode 100644 index 0000000..a59a00a Binary files /dev/null and b/core/migrations/__pycache__/0001_initial.cpython-37.pyc differ diff --git a/core/migrations/__pycache__/0002_auto_20220504_1912.cpython-37.pyc b/core/migrations/__pycache__/0002_auto_20220504_1912.cpython-37.pyc new file mode 100644 index 0000000..f500cac Binary files /dev/null and b/core/migrations/__pycache__/0002_auto_20220504_1912.cpython-37.pyc differ diff --git a/core/migrations/__pycache__/0002_auto_20220504_2124.cpython-37.pyc b/core/migrations/__pycache__/0002_auto_20220504_2124.cpython-37.pyc new file mode 100644 index 0000000..efd3004 Binary files /dev/null and b/core/migrations/__pycache__/0002_auto_20220504_2124.cpython-37.pyc differ diff --git a/core/migrations/__pycache__/0003_auto_20220504_2125.cpython-37.pyc b/core/migrations/__pycache__/0003_auto_20220504_2125.cpython-37.pyc new file mode 100644 index 0000000..81401ef Binary files /dev/null and b/core/migrations/__pycache__/0003_auto_20220504_2125.cpython-37.pyc differ diff --git a/core/migrations/__pycache__/0004_rename_shot_shotongoal.cpython-37.pyc b/core/migrations/__pycache__/0004_rename_shot_shotongoal.cpython-37.pyc new file mode 100644 index 0000000..2bec3f3 Binary files /dev/null and b/core/migrations/__pycache__/0004_rename_shot_shotongoal.cpython-37.pyc differ diff --git a/core/migrations/__pycache__/0005_rename_shotongoal_shot.cpython-37.pyc b/core/migrations/__pycache__/0005_rename_shotongoal_shot.cpython-37.pyc new file mode 100644 index 0000000..674e42d Binary files /dev/null and b/core/migrations/__pycache__/0005_rename_shotongoal_shot.cpython-37.pyc differ diff --git a/core/migrations/__pycache__/0006_auto_20220504_2306.cpython-37.pyc b/core/migrations/__pycache__/0006_auto_20220504_2306.cpython-37.pyc new file mode 100644 index 0000000..2813c79 Binary files /dev/null and b/core/migrations/__pycache__/0006_auto_20220504_2306.cpython-37.pyc differ diff --git a/core/migrations/__pycache__/0007_penelty_peneltylength_peneltytype.cpython-37.pyc b/core/migrations/__pycache__/0007_penelty_peneltylength_peneltytype.cpython-37.pyc new file mode 100644 index 0000000..589b066 Binary files /dev/null and b/core/migrations/__pycache__/0007_penelty_peneltylength_peneltytype.cpython-37.pyc differ diff --git a/core/migrations/__pycache__/__init__.cpython-37.pyc b/core/migrations/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..891b075 Binary files /dev/null and b/core/migrations/__pycache__/__init__.cpython-37.pyc differ diff --git a/core/models.py b/core/models.py new file mode 100644 index 0000000..9cc6e9e --- /dev/null +++ b/core/models.py @@ -0,0 +1,134 @@ +from django.db import models + +# Create your models here. +class Season(models.Model): + name = models.CharField(max_length=32, blank=False, null=False) + start_date = models.DateField(blank=True, null=True) + end_date = models.DateField(blank=True, null=True) + +class Division(models.Model): + name = models.CharField(max_length=64, blank=False, null=False) + +class Team(models.Model): + name = models.CharField(max_length=32, blank=False, null=False) + season = models.ForeignKey(Season, related_name="teams", on_delete=models.PROTECT, blank=False, null=False) + division = models.ForeignKey(Division, related_name="teams", on_delete=models.PROTECT, blank=False, null=False) + +class Player(models.Model): + first_name = models.CharField(max_length=32, blank=True, null=False) + last_name = models.CharField(max_length=32, blank=False, null=False) + middle_names = models.CharField(max_length=64, blank=True, null=False) + teams = models.ManyToManyField(Team, related_name="players", blank=True) + +class Game(models.Model): + _name = models.CharField(max_length=64, blank=True, null=True) + home_team = models.ForeignKey(Team, related_name="home_games", on_delete=models.PROTECT, blank=True, null=True) + away_team = models.ForeignKey(Team, related_name="away_games", on_delete=models.PROTECT, blank=True, null=True) + season = models.ForeignKey(Season, related_name="games", on_delete=models.PROTECT, blank=False, null=False) + date_of = models.DateField(blank=False, null=False) + time_of = models.TimeField(blank=True, null=True) + + def name(self): + return name if name else f"{home_team} v. {away_team}" + +PERIOD_CHOICES = [ + (1, "1st"), + (2, "2nd"), + (3, "3rd"), + (4, "OT"), + (5, "2OT"), + (6, "3OT"), + (7, "4OT"), + (8, "5OT"), + (9, "6OT"), + (0, "SO") +] + +class Goal(models.Model): + scorer = models.ForeignKey(Player, related_name="goals", on_delete=models.PROTECT, blank=False, null=False) + game = models.ForeignKey(Game, related_name="goals", on_delete=models.PROTECT, blank=False, null=False) +# NOTE: may be null if empty net + goalie = models.ForeignKey(Player, related_name="goals_on", on_delete=models.PROTECT, blank=True, null=True) + assists = models.ManyToManyField(Player, related_name="assists", blank=True) + period = models.IntegerField(choices=PERIOD_CHOICES, blank=False, null=False, default=1) + time = models.DurationField(blank=True, null=True) +# TODO allow no time column during SO + +class Shot(models.Model): + SHOT_TYPE_CHOICES = [ + ("O", "On Goal"), + ("M", "Missed"), + ("B", "Blocked"), + ] +# NOTE: default shot type is "on goal" + shot_type = models.CharField(max_length=1, choices=SHOT_TYPE_CHOICES, blank=False, null=False, default="O") + shooter = models.ForeignKey(Player, related_name="shots", on_delete=models.PROTECT, blank=False, null=False) + game = models.ForeignKey(Game, related_name="shots", on_delete=models.PROTECT, blank=False, null=False) + period = models.IntegerField(choices=PERIOD_CHOICES, blank=False, null=False, default=1) + time = models.DurationField(blank=True, null=True) +# NOTE: the goalie the shot was on; note that only player.shots_on.filter(shot_type="O") count as saved goals +# NOTE: may be blank if an attempt is made on an open net + goalie = models.ForeignKey(Player, related_name="shots_on", on_delete=models.PROTECT, blank=True, null=True) +# TODO allow no time column during SO +# this is only set in the case of a shot_type="B" for blocked + blocker = models.ForeignKey(Player, related_name="blocked_shots", on_delete=models.PROTECT, blank=True, null=True) + +# NOTE: game misconducts will eject a player from the game, but the penelty may be served by another player +class PeneltyLength(models.Model): + PENELTY_LENGTH_CHOICES = [ + ("M", "Minor"), # 2 mins in NHL + ("D", "Double Minor"), # 4 mins in NHL + ("J", "Major"), # 5 mins in NHL + ("C", "Misconduct"), # 10 mins in NHL + ("G", "Game Misconduct"), # ejection from game in NHL + ("S", "Shot"), # penelty shot + ] + name = models.CharField(max_length=1, choices=PENELTY_LENGTH_CHOICES, blank=False, null=False) + length = models.DurationField(blank=False, null=False) + +# NOTE: i.e.: "Minor (2:00)", or "Misconduct (10:00")", or "Shot" +# TODO: filter shot + def __str__(self): + return f"{self.name} ({self.length})" + +class PeneltyType(models.Model): + PENELTY_TYPE_CHOICES = [ + ("B", "Boarding"), + ("C", "Charging"), + ("D", "Delay of Game"), + ("X", "Cross-Checking"), + ("E", "Elbowing"), + ("G", "Grasping the Facemask"), + ("H", "High Sticking"), + ("O", "Holding"), + ("K", "Hooking"), + ("I", "Interference"), + ("M", "Miscounduct"), # see above where misconduct equals 10 minutes + ("R", "Roughing"), + ("S", "Slashing"), + ("P", "Spearing"), + ("T", "Tripping"), + ("U", "Unsportsmanlike Conduct"), + ] + name = models.CharField(max_length=1, choices=PENELTY_TYPE_CHOICES, blank=False, null=False) + +class Penelty(models.Model): + PENELTY_GIVEN_CHOICES = [ + ("I", "Individual"), + ("T", "Team"), # e.g., too many men + ] +# default="I" because individual penelties are much more common + penelty_classification = models.CharField(max_length=1, choices=PENELTY_GIVEN_CHOICES, blank=False, null=False, default="I") + penelty_type = models.ForeignKey(PeneltyType, related_name="given_out", on_delete=models.PROTECT, blank=False, null=False) + penelty_length = models.ForeignKey(PeneltyLength, related_name="given_out", on_delete=models.PROTECT, blank=False, null=False) + game = models.ForeignKey(Game, related_name="penelties", on_delete=models.PROTECT, blank=False, null=False) +# NOTE: may be none if team penelty like too many men + on_ind = models.ForeignKey(Player, related_name="penelties_given", on_delete=models.PROTECT, blank=True, null=True) +# NOTE: may be noen if individual penelty + on_team = models.ForeignKey(Team, related_name="penelties_given", on_delete=models.PROTECT, blank=True, null=True) +# NOTE: some player will ALWAYS serve the penelty + served_by = models.ForeignKey(Player, related_name="penelties_served", on_delete=models.PROTECT, blank=False, null=False) +# NOTE: an indiviaul will not be named in the case of a delay of game; some misconducts, like swearing at a referee also would not list a "drawn_by" + drawn_by = models.ForeignKey(Player, related_name="penelties_drawn", on_delete=models.PROTECT, blank=True, null=True) + period = models.IntegerField(choices=PERIOD_CHOICES, blank=False, null=False) + time = models.DurationField(blank=False, null=False) diff --git a/core/tests.py b/core/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/core/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/core/views.py b/core/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/core/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/csvs/low_vision_and_development/game_1/shots_game_one_lvad.csv b/csvs/low_vision_and_development/game_1/shots_game_one_lvad.csv new file mode 100644 index 0000000..6531d20 --- /dev/null +++ b/csvs/low_vision_and_development/game_1/shots_game_one_lvad.csv @@ -0,0 +1,26 @@ +goal,name,period,time,assists,goalie +0,Tait,1,16:58,"",Catharine +0,Denis,1,15:12,"",Nelson +0,Foulds,1,12:16,"",Nelson +0,Clement,1,10:38,"",Nelson +0,Scanlon,1,8:15,"",Catharine +0,Scanlon,1,5:25,"",Catharine +0,Dave,1,3:41,"",Nelson +0,Hoyem,1,2:51,"",Catharine +0,Joseph,1,0:39,"",Catharine +0,Foulds,2,12:22,"",Nelson +0,Mark,2,12:13,"",Nelson +0,Scanlon,2,11:16,"",Catharine +0,Anton,2,10:51,"",Catharine +0,Sison,2,5:34,"",Catharine +0,Scanlon,2,5:21,"",Catharine +0,Clement,2,4:03,"",Nelson +0,Scanlon,2,2:54,"",Catharine +0,Scanlon,2,2:40,"",Catharine +0,Foulds,3,8:37,"",Nelson +1,Clement,3,8:23,"Foulds",Nelson +0,Hoyem,3,7:13,"",Catharine +0,Jillian,3,4:57,"",Nelson +0,Laura,3,3:32,"",Nelson +0,Scanlon,3,0:30,"",Catharine +1,MacLean,3,0:26,"",Catharine diff --git a/csvs/low_vision_and_development/game_2/penelties_game_two_lvad.csv b/csvs/low_vision_and_development/game_2/penelties_game_two_lvad.csv new file mode 100644 index 0000000..31ea847 --- /dev/null +++ b/csvs/low_vision_and_development/game_2/penelties_game_two_lvad.csv @@ -0,0 +1,6 @@ +by,served_by,on,period,time,video_timestamp,type,length +# TODO make 3 minute penelty +Lafrance,Lafrance,Scanlon,1,4:33,19:35,X,M +Poidevin,Poidevin,Joseph,2,7:59,39:17,T,M +MacLean,MacLean,Lafrance,3,4:16,1:06:28,K,M +Lafrance,Lafrance,Salaaman,3,1:07,1:11:37,X,M diff --git a/csvs/low_vision_and_development/game_2/shots_game_two_lvad.csv b/csvs/low_vision_and_development/game_2/shots_game_two_lvad.csv new file mode 100644 index 0000000..b7c666c --- /dev/null +++ b/csvs/low_vision_and_development/game_2/shots_game_two_lvad.csv @@ -0,0 +1,29 @@ +goal,name,period,time,assists,goalie,video_timestamp +0,Jillian,1,18:40,"",Nelson,5:29 +0,Fancy,1,13:48,"",Nelson,10:21 +0,Anton,1,7:45,"",Catharine,16:25 +0,Jillian,1,1:47,"",Nelson,22:23 +0,Robinson,1,0:47,"",Catharine,23:22 +1,Scarlette,2,19:46,"Scanlon",Stewart,27:29 +0,Jillian,2,18:02,"",Nelson,29:14 +0,Scanlon,2,16:30,"",Stewart,30:45 +0,Sweet,2,14:30,"",Stewart,32:46 +0,Hoyem,2,12:58,"",Stewart,34:19 +0,MacLean,2,10:32,"",Stewart,36:43 +0,Scanlon,2,8:25,"",Stewart,40:51 +0,Lafrance,2,5:00,"",Nelson,42:16 +0,Lafrance,2,4:22,"",Nelson,42:54 +0,MacLean,2,2:48,"",Stewart,44:28 +0,Foulds,2,1:17,"",Nelson,45:58 +0,Foulds,2,1:14,"",Nelson,46:01 +0,Hoyem,3,19:04,"",Cathrine,51:41 +0,Robinson,3,17:28,"",Catharine,53:17 +0,Robinson,3,16:19,"",Catharine,54:25 +0,Scanlon,3,14:35,"",Catharine,56:09 +0,Foulds,3,12:18,"",Nelson,58:27 +0,Scanlon,3,11:13,"",Catharine,59:32 +0,Scanlon,3,10:21,"",Catharine,1:00:23 +0,Scanlon,3,9:51,"",Catharine,1:00:54 +0,Scanlon,3,9:30,"",Catharine,1:01:15 +0,Scanlon,3,9:12,"",Catharine,1:01:33 +0,Hoyem,3,0:22,"",Catharine,1:13:22 diff --git a/csvs/low_vision_and_development/game_3/penelties_game_three_lvad.csv b/csvs/low_vision_and_development/game_3/penelties_game_three_lvad.csv new file mode 100644 index 0000000..6f864d9 --- /dev/null +++ b/csvs/low_vision_and_development/game_3/penelties_game_three_lvad.csv @@ -0,0 +1,2 @@ +by,served_by,on,period,time,video_timestamp,type,length +Kucy,Kucy,Scarlatte,1,3:32,28:32,B,M diff --git a/csvs/low_vision_and_development/game_3/shots_game_three_lvad.csv b/csvs/low_vision_and_development/game_3/shots_game_three_lvad.csv new file mode 100644 index 0000000..2418b1e --- /dev/null +++ b/csvs/low_vision_and_development/game_3/shots_game_three_lvad.csv @@ -0,0 +1,22 @@ +goal,name,period,time,assists,goalie,video_timestamp +1,Jillian,1,10:57,"Poilavan",Nelson,21:08 +1,Scanlon,1,9:25,"#15",Stewart,22:40 +0,Scanlon,1,6:25,"",Stewart,25:39 +0,Hoyem,1,2:53,"",Stewart,29:11 +0,MacLean,1:39,"",Stewart,30:25 +0,Hoyem,1,1:14,"",Stewart,30:50 +0,Scanlon,1,1:10,"",Strewart,30:53 +0,Hoyem,1,1:08,"",Stewart,30:55 +0,Foulds,2,11:15,"",Nelson,35:20 +0,Scanlon,2,9:00,"",Kathrine,37:35 +0,Scanlon,2,8:32,"",Kathrine,38:02 +0,Hoyem,2,7:50,"",Kathrine,38:44 +0,Scanlon,2,6:52,"",Kathrine,39:42 +0,Kucy,2,4:12,"",Nelson,42:23 +0,Scanlon,2,2:42,"",Kathrine,44:37 +0,Foulds,2,1:40,"",Nelson,35:39 +0,Poidevin,2,17:22,"",Nelson,52:38 +0,Poidevin,2,13:52,"",Nelson,56:07 +0,Scanlon,3,9:09,"",Kathrine,1:00:51 +1,Hoyem,3,4:42,"",Katharine,1:05:18 +0,Scanlon,3,2:33,"",Katharine,1:07:27 diff --git a/csvs/low_vision_and_development/game_4/penelties_game_four_lvad.csv b/csvs/low_vision_and_development/game_4/penelties_game_four_lvad.csv new file mode 100644 index 0000000..07d9e07 --- /dev/null +++ b/csvs/low_vision_and_development/game_4/penelties_game_four_lvad.csv @@ -0,0 +1,5 @@ +by,served_by,on,period,time,video_timestamp,type,length +Kucy,Kucy,Robinson,2,2:55,42:50,I,M +MacLean,MacLean,Poidevin,2,0:22,45:10,I,M +MacLean,MacLean,Foulds,3,11:50,56:56,B,M +MacLean,MacLean,Lafrance,3,1:15,1:07:30,K,M diff --git a/csvs/low_vision_and_development/game_4/shots_game_four_lvad.csv b/csvs/low_vision_and_development/game_4/shots_game_four_lvad.csv new file mode 100644 index 0000000..a50e4b8 --- /dev/null +++ b/csvs/low_vision_and_development/game_4/shots_game_four_lvad.csv @@ -0,0 +1,37 @@ +goal,name,period,time,assists,goalie,video_timestamp +0,Jillian,1,18:14,"",Nelson,04:19 +0,MacLean,1,17:07,"",Cathrine,05:26 +0,Scanlon,1,14:48,"",Cathrine,07:46 +0,Scanlon,1,14:39,"",Cathrine,07:54 +0,Scanlon,1,14:33,"",Cathrine,08:01 +0,MacLean,1,13:56,"",Cathrine,08:38 +0,Robsinson,1,13:14,"",Cathrine,09:20 +# is a shot on your own net an SOG? +#0,#12,,1,12:34,"",Cathrine,10:00 +1,Leblanc,1,11:31,"",Nelson,11:03 +0,Robinson,1,2:44,"",Cathrine,19:50 +1,Scanlon,1,1:46,"Scarlette",Cathrine,20:47 +0,Poidevan,1,0:19,"",Nelson,22:15 +0,Scarlette,2,18:01,"",Stewart,27:43 +0,Hoyem,2,15:53,"",Stewart,29:52 +1,Scanlon,2,14:43,"MacLean",Stewart,31:02 +0,Scanlon,2,13:09,"",Stewart,32:36 +0,Hoyem,2,11:37,"",Stewart,34:07 +0,Anton,2,11:36,"",Stewart,34:08 +0,Foulds,2,11:08,"",Nelson,34:37 +0,Scanlon,2,10:19,"",Stewart,35:26 +1,Scanlon,2,10:13,"Hoyem",Stewart,35:32 +0,Scarlette,2,8:35,"",Stewart,37:10 +1,Scanlon,2,8:34,"Scarlette",Stewart,37:11 +0,Foulds,2,7:05,"",Nelson,38:40 +1,Lafrance,3,19:53,"Foulds",Nelson,48:54 +1,Foulds,3,16:12,"Lafrance",Nelson,52:34 +0,Hoyem,3,14:52,"",Cathrine,53:54 +0,Hoyem,3,14:28,"",Cathrine,54:18 +0,Lafrance,3,13:00,"",Nelson,55:46 +0,Poidevin,3,12:18,"",Nelson,56:28 +0,Scanlon,3,5:52,"",Cathrine,1:02:54 +0,Foulds,3,0:31,"",Nelson,1:09:45 +0,Lafrance,3,0:28,"",Nelson,1:09:48 +1,Jillian,3,0:16,"Foulds",Nelson,1:10:32 + diff --git a/csvs/low_vision_and_development/teams.csv b/csvs/low_vision_and_development/teams.csv new file mode 100644 index 0000000..e4254bc --- /dev/null +++ b/csvs/low_vision_and_development/teams.csv @@ -0,0 +1,31 @@ +player_name,season,division,team,position +Tait Hoyem,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullseye,? +Hillary Scanlon,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullseye,? +Nelson Rego,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullseye,G +Carrie Anton,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullseye,? +Salamaan Chaudhri,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullseye,? +Ben Ho Lung,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullseye,? +Brian MacLean,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullseye,? +Shannon Murphy,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullseye,? +Joseph Robinson,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullseye,? +Drexcyl Sison,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullseye,? +Ginny Sweet,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullyeye,? +Catharine Lemay,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,G +Thomas Stewart,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,G +Maurice Clement-Lafrance,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,? +Jennifer Fancy,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,? +Allyssa Foulds,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,? +Ryan Kucy,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,? +Denis Deblanc,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,? +Bob Lowe,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,? +Ted Moritsugu,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,? +Dave Poidevin,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,? +Jillian Stewart,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,? +Laura Mark,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,? +Matt Arnold,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,H +Rory Kucy,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,H +Jeff Stewart,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,See Cats,H +Dylan Brown,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullseye,H +Codi Isaac,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullseye,H +Richard Isaac,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullseye,H +Tyler McGuffin,2022 Canadian National Blind Hockey Tournament,Low Vision & Development Division,Bullseye,H diff --git a/csvs/open/teams.csv b/csvs/open/teams.csv new file mode 100644 index 0000000..70f980d --- /dev/null +++ b/csvs/open/teams.csv @@ -0,0 +1,69 @@ +player_name,season,division,team,position +Roland Arndt,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,? +Mark Bentz,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,? +Mark DeMontis,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,? +Craig Fitzpatrick,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,? +Sean Heaslip,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,? +Edward Laba,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,? +Hughes Leduc,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,? +Amanda Provan,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,? +Paul Schmold,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,? +Wayne St.Denis,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,? +Nathan Tunis,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,? +Jason Yuha,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,? +Joey Cabral,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,G +Paul Kerins,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,H +Joe McCallion,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,O +Robert DeMontis,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,O +Sylvian Audet,2022 Canadian National Blind Hockey Tournament,Open Divison,Ice Owls,O +Christine Callagy,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,? +Joe Fornasier,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,? +Yan Gobeil,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,? +Michel Lapierre,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,? +Tristan Lindberg,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,? +Braedan Lyons,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,? +Brian Mackie,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,? +Meghan Mahon,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,? +Alain Reno,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,? +James Ruttle,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,? +Curtis Ruttle,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,? +Francis Mainella,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,G +Oliver Pye,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,G +Jeff Street,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,H +Fred Angers,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,O +Matt Arnold,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,O +Frank Fornasier,2022 Canadian National Blind Hockey Tournament,Open Divison,Eclipse,O +Randy Banks,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,? +Francis Beauregard,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,? +Dylan Bradbury,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,? +Bruno Cache,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,? +Joni Kokko,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,? +Emily McLean,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,? +Chaz Misuraca,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,? +Gilles Ouellet,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,? +Jukka Pulkinen,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,? +Kelly Serbu,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,? +Nathan Tree,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,? +Lorne Webber,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,G +Paul Strople,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,H +Joey Ali,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,O +Thomas Jalas,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,O +Denis Maybury,2022 Canadian National Blind Hockey Tournament,Open Divison,Seeing Ice Dogs,O +Julien Blais,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,? +Normand Blais,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,? +Dustin Butterfield,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,? +Anthony Ciulla,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,? +Brian Cowie,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,? +Martin Dufour,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,? +Graham Foxcroft,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,? +Gianna Griffith,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,? +Brandon Joy,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,? +Laura Mark,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,? +John Tee,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,? +Joe Zylak,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,? +David Brown,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,G +Mario Ros,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,G +Brock Quarrington,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,H +Kieran Mullally,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,O +Jason Rakovitis,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,O +Sean Cowie,2022 Canadian National Blind Hockey Tournament,Open Divison,Hiboux,O diff --git a/csvs/womens/game_1/shots.csv b/csvs/womens/game_1/shots.csv new file mode 100644 index 0000000..6e568fe --- /dev/null +++ b/csvs/womens/game_1/shots.csv @@ -0,0 +1,23 @@ +goal,name,period,time,assists,goalie,video_timestamp +0,Emily McLean,1,10:47,"",McQue,19:03 +0,Emily McLean,1,10:02,"",McQue,19:48 +1,Emily McLean,1,9:47,"Amanda Provin",McQue,20:03 +0,Amanda Provin,1,7:14,"",McQue,22:36 +0,Vivian Foret,1,6:26,"",McQue,23:23 +0,Emily McLean,1,3:48,"",McQue,26:02 +0,Amanda Provin,1,2:56,"",McQue,26:55 +1,Amanda Provin,1,1:11,"",McQue,28:38 +0,Scanlon,2,10:44,"",Catharine,36:02 +0,Amanda Provin,2,10:42,"",Catharine,36:04 +0,Laura Mark,2,10:39,"",Catharine,36:06 +1,Mahon,2,7:55,"Cassandra Ruttle",McQue,38:51 +0,Callagy,2,4:55,"",Catharine,41:51 +0,Amanda,2:17,"",McQue,44:30 +1,Amanda,2:16,"Mahon",McQue,44:31 +0,Callagy,3,11:40,"",Catharine,50:58 +0,Amanda,3,9:07,"",McQue,53:32 +0,Callagy,3,4:35,"",Catharine,58:04 +0,Mark,3,4:34,"",Catharine,58:03 +0,McKracken,3,4:28,"",Catharine,58:11 +0,Callagy,3,3:46,"",Cathrine,1:00:05 +0,Callagy,3,2:14,"",Catharine,1:01:40 diff --git a/csvs/womens/teams.csv b/csvs/womens/teams.csv new file mode 100644 index 0000000..e69de29 diff --git a/hockeystats/__pycache__/__init__.cpython-37.pyc b/hockeystats/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..35917c7 Binary files /dev/null and b/hockeystats/__pycache__/__init__.cpython-37.pyc differ diff --git a/hockeystats/__pycache__/settings.cpython-37.pyc b/hockeystats/__pycache__/settings.cpython-37.pyc new file mode 100644 index 0000000..3bfb487 Binary files /dev/null and b/hockeystats/__pycache__/settings.cpython-37.pyc differ diff --git a/hockeystats/__pycache__/urls.cpython-37.pyc b/hockeystats/__pycache__/urls.cpython-37.pyc new file mode 100644 index 0000000..20c067e Binary files /dev/null and b/hockeystats/__pycache__/urls.cpython-37.pyc differ diff --git a/hockeystats/__pycache__/wsgi.cpython-37.pyc b/hockeystats/__pycache__/wsgi.cpython-37.pyc new file mode 100644 index 0000000..e848693 Binary files /dev/null and b/hockeystats/__pycache__/wsgi.cpython-37.pyc differ diff --git a/hockeystats/settings.py b/hockeystats/settings.py index d159c1c..6829adf 100644 --- a/hockeystats/settings.py +++ b/hockeystats/settings.py @@ -25,18 +25,20 @@ SECRET_KEY = 'django-insecure-!%q6x!-!z^^(vxhs*zsuztwc@#(x&^w4=pyghye*)47znc3ng( # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ["*"] # Application definition INSTALLED_APPS = [ + "accounts", 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + "core", ] MIDDLEWARE = [ @@ -121,3 +123,5 @@ STATIC_URL = 'static/' # https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' + +USER_MODEL = "accounts.HockeyUser" diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..82d9c0e --- /dev/null +++ b/run.sh @@ -0,0 +1,2 @@ +#!/bin/sh +python3 manage.py runserver 0.0.0.0:8001