fixed typo in the names of teamsnap models
This commit is contained in:
33
teamsnap/migrations/0015_auto_20211210_1744.py
Normal file
33
teamsnap/migrations/0015_auto_20211210_1744.py
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# Generated by Django 3.2.6 on 2021-12-10 17:44
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('teamsnap', '0014_alter_lineupentry_teamsnap_id'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='event',
|
||||||
|
old_name='bencoach_event',
|
||||||
|
new_name='benchcoach_event',
|
||||||
|
),
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='location',
|
||||||
|
old_name='bencoach_venue',
|
||||||
|
new_name='benchcoach_venue',
|
||||||
|
),
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='member',
|
||||||
|
old_name='bencoach_player',
|
||||||
|
new_name='benchcoach_player',
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='lineupentry',
|
||||||
|
name='sequence',
|
||||||
|
field=models.PositiveSmallIntegerField(blank=True, default=0, null=True),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -35,7 +35,7 @@ class Team(TeamsnapBaseModel):
|
|||||||
return f"https://go.teamsnap.com/{self.team.teamsnap_id}/team/edit/{self.teamsnap_id}"
|
return f"https://go.teamsnap.com/{self.team.teamsnap_id}/team/edit/{self.teamsnap_id}"
|
||||||
|
|
||||||
class Location(TeamsnapBaseModel):
|
class Location(TeamsnapBaseModel):
|
||||||
bencoach_venue = models.ForeignKey(venues.models.Venue, null=True, on_delete=models.CASCADE)
|
benchcoach_venue = models.ForeignKey(venues.models.Venue, null=True, on_delete=models.CASCADE)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def view_url(self):
|
def view_url(self):
|
||||||
@@ -47,7 +47,7 @@ class Location(TeamsnapBaseModel):
|
|||||||
|
|
||||||
class Member(TeamsnapBaseModel):
|
class Member(TeamsnapBaseModel):
|
||||||
name = None
|
name = None
|
||||||
bencoach_player = models.ForeignKey(players.models.Player, null=True, on_delete=models.CASCADE)
|
benchcoach_player = models.ForeignKey(players.models.Player, null=True, on_delete=models.CASCADE)
|
||||||
team = models.ForeignKey(Team, null=True, on_delete=models.CASCADE)
|
team = models.ForeignKey(Team, null=True, on_delete=models.CASCADE)
|
||||||
first_name = models.CharField(max_length = 50, null=True)
|
first_name = models.CharField(max_length = 50, null=True)
|
||||||
last_name = models.CharField(max_length = 50, null=True)
|
last_name = models.CharField(max_length = 50, null=True)
|
||||||
@@ -66,7 +66,7 @@ class Member(TeamsnapBaseModel):
|
|||||||
return f"https://go.teamsnap.com/{self.team.teamsnap_id}/roster/edit/{self.teamsnap_id}"
|
return f"https://go.teamsnap.com/{self.team.teamsnap_id}/roster/edit/{self.teamsnap_id}"
|
||||||
|
|
||||||
class Event(TeamsnapBaseModel):
|
class Event(TeamsnapBaseModel):
|
||||||
bencoach_event = models.ForeignKey(events.models.Event, null=True, on_delete=models.CASCADE)
|
benchcoach_event = models.ForeignKey(events.models.Event, null=True, on_delete=models.CASCADE)
|
||||||
label = models.CharField(max_length = 50, null=True)
|
label = models.CharField(max_length = 50, null=True)
|
||||||
start_date = models.DateTimeField(null=True)
|
start_date = models.DateTimeField(null=True)
|
||||||
opponent = models.ForeignKey(Team, null=True, on_delete=models.CASCADE, related_name="opponent")
|
opponent = models.ForeignKey(Team, null=True, on_delete=models.CASCADE, related_name="opponent")
|
||||||
|
|||||||
Reference in New Issue
Block a user