Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from NFM-Studios/leagues
Leagues Functionality
- Loading branch information
Showing
55 changed files
with
2,471 additions
and
3 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class LeaguesConfig(AppConfig): | ||
name = 'leagues' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# Generated by Django 2.2.12 on 2020-05-16 00:48 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('matches', '0022_auto_20200410_1506'), | ||
('teams', '0008_team_image'), | ||
('singletournaments', '0021_auto_20200420_0007'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='LeagueSettings', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(default='League Ruleset', max_length=50)), | ||
('ot_losses', models.BooleanField(default=True)), | ||
('pts_ot_loss', models.PositiveSmallIntegerField(default=1)), | ||
('ot_wins', models.BooleanField(default=False)), | ||
('pts_ot_win', models.PositiveSmallIntegerField(default=3)), | ||
('pts_win', models.PositiveSmallIntegerField(default=3)), | ||
('pts_loss', models.PositiveSmallIntegerField(default=0)), | ||
('allow_tie', models.BooleanField(default=False)), | ||
('num_games', models.PositiveIntegerField(default=10)), | ||
('auto_schedule', models.BooleanField(default=False)), | ||
('record_format', models.CharField(choices=[(1, 'W-L-OTL'), (2, 'W-L-T'), (3, 'W-L-OTW-OTL'), (4, 'W-L-OTW-OTL-OTT'), (5, 'W-L')], default='W-L-OTL', max_length=20)), | ||
('num_divisons', models.PositiveSmallIntegerField(default=2)), | ||
('max_division_size', models.PositiveSmallIntegerField(default=5)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='LeagueTeam', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('wins', models.PositiveSmallIntegerField(default=0)), | ||
('losses', models.PositiveSmallIntegerField(default=0)), | ||
('ot_losses', models.PositiveSmallIntegerField(default=0)), | ||
('ot_wins', models.PositiveSmallIntegerField(default=0)), | ||
('ties', models.PositiveSmallIntegerField(default=0)), | ||
('team', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='league_team', to='teams.Team')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='LeagueDivision', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=50, null=True)), | ||
('games', models.ManyToManyField(blank=True, to='matches.Match')), | ||
('teams', models.ManyToManyField(blank=True, to='leagues.LeagueTeam')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='League', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(default='League Name', max_length=50)), | ||
('active', models.BooleanField(default=False)), | ||
('info', models.TextField(default='No information provided')), | ||
('created', models.DateTimeField(auto_now_add=True)), | ||
('updated', models.DateTimeField(auto_now=True)), | ||
('image', models.ImageField(blank=True, upload_to='league_images')), | ||
('teamformat', models.SmallIntegerField(choices=[(0, '1v1'), (1, '2v2'), (2, '3v3'), (3, '4v4'), (4, '5v5'), (5, '6v6')], default=1)), | ||
('bestof', models.SmallIntegerField(choices=[(0, 'Best of 1'), (1, 'Best of 3'), (2, 'Best of 5'), (3, 'Best of 7'), (4, 'Best of 9')], default=0)), | ||
('allow_register', models.BooleanField(default=False)), | ||
('open_register', models.DateTimeField()), | ||
('close_register', models.DateTimeField()), | ||
('start', models.DateTimeField()), | ||
('divisions', models.ManyToManyField(blank=True, to='leagues.LeagueDivision')), | ||
('game', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='league_game', to='matches.GameChoice')), | ||
('platform', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='league_platform', to='matches.PlatformChoice')), | ||
('ruleset', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='league_ruleset', to='singletournaments.SingleTournamentRuleset')), | ||
('settings', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='league_settings', to='leagues.LeagueSettings')), | ||
('sport', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='league_sport', to='matches.SportChoice')), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 2.2.12 on 2020-05-16 00:55 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('matches', '0022_auto_20200410_1506'), | ||
('leagues', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='league', | ||
name='maps', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='league_maps', to='matches.MapPoolChoice'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 2.2.12 on 2020-05-16 01:39 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('leagues', '0002_league_maps'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='league', | ||
name='credits', | ||
field=models.PositiveSmallIntegerField(default=0), | ||
), | ||
migrations.AddField( | ||
model_name='league', | ||
name='size', | ||
field=models.PositiveSmallIntegerField(default=8), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.12 on 2020-05-16 02:05 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('leagues', '0003_auto_20200515_2139'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='leaguesettings', | ||
old_name='num_divisons', | ||
new_name='num_divisions', | ||
), | ||
] |
17 changes: 17 additions & 0 deletions
17
leagues/migrations/0005_remove_leaguesettings_record_format.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 2.2.12 on 2020-05-16 02:23 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('leagues', '0004_auto_20200515_2205'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='leaguesettings', | ||
name='record_format', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.12 on 2020-05-16 22:08 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('leagues', '0005_remove_leaguesettings_record_format'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='league', | ||
name='disable_userreport', | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.12 on 2020-05-16 22:09 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('leagues', '0006_league_disable_userreport'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='league', | ||
old_name='credits', | ||
new_name='req_credits', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 2.2.12 on 2020-05-16 22:14 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('leagues', '0007_auto_20200516_1809'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='league', | ||
name='sport', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='league_sport', to='matches.SportChoice'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.12 on 2020-05-16 22:15 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('leagues', '0008_auto_20200516_1814'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='league', | ||
name='divisions', | ||
field=models.ManyToManyField(blank=True, null=True, to='leagues.LeagueDivision'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generated by Django 2.2.12 on 2020-05-16 22:17 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('leagues', '0009_auto_20200516_1815'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='league', | ||
name='divisions', | ||
field=models.ManyToManyField(blank=True, to='leagues.LeagueDivision'), | ||
), | ||
migrations.AlterField( | ||
model_name='league', | ||
name='game', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='league_game', to='matches.GameChoice'), | ||
), | ||
migrations.AlterField( | ||
model_name='league', | ||
name='platform', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='league_platform', to='matches.PlatformChoice'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.12 on 2020-05-16 22:17 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('leagues', '0010_auto_20200516_1817'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='league', | ||
name='image', | ||
field=models.ImageField(blank=True, null=True, upload_to='league_images'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 2.2.12 on 2020-05-16 22:18 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('leagues', '0011_auto_20200516_1817'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='league', | ||
name='maps', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='league_maps', to='matches.MapPoolChoice'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.12 on 2020-05-26 17:01 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('leagues', '0012_auto_20200516_1818'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='leaguesettings', | ||
name='auto_matchup', | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.12 on 2020-05-30 23:01 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('leagues', '0013_leaguesettings_auto_matchup'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='leaguedivision', | ||
old_name='games', | ||
new_name='matches', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated by Django 2.2.14 on 2020-07-26 21:05 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('leagues', '0014_auto_20200530_1901'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='league', | ||
name='prize1', | ||
field=models.CharField(default='no prize specified', max_length=50), | ||
), | ||
migrations.AddField( | ||
model_name='league', | ||
name='prize2', | ||
field=models.CharField(default='no prize specified', max_length=50), | ||
), | ||
migrations.AddField( | ||
model_name='league', | ||
name='prize3', | ||
field=models.CharField(default='no prize specified', max_length=50), | ||
), | ||
] |
Oops, something went wrong.