implement lineup send to gamechanger

This commit is contained in:
2022-06-08 14:08:33 -05:00
parent 50c9b70546
commit f788fb9932
21 changed files with 409 additions and 82 deletions

View File

@@ -1,20 +1,36 @@
from django import forms
from django.db import models
from django.db.models import CharField, EmailField
from benchcoach.users.models import User
# Create your models here.
class Account(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name="gamechanger_account")
user = models.OneToOneField(
User, on_delete=models.CASCADE, related_name="gamechanger_account"
)
email = EmailField()
password = CharField(max_length=255)
class Preferences(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name="gamechanger_preferences")
user = models.OneToOneField(
User, on_delete=models.CASCADE, related_name="gamechanger_preferences"
)
season_id = CharField(max_length=255)
team_id = CharField(max_length=255)
class Meta:
verbose_name_plural = "preferences"
class Player(models.Model):
id = models.AutoField(primary_key=True)
id = models.CharField(primary_key=True, max_length=30)
teamsnap_member_id = models.IntegerField()
fname = CharField(max_length=30)
lname = CharField(max_length=30)
widgets = {
"teamsnap_member_id": forms.Select(choices=(), attrs={"class": "form-control"}),
}