Private
Public Access
1
0

more foundation work for scoring

This commit is contained in:
Sander Roosendaal
2020-05-26 10:56:23 +02:00
parent 74ff1f9874
commit 08c7562c51
4 changed files with 132 additions and 5 deletions

View File

@@ -2196,6 +2196,10 @@ from django.core.validators import RegexValidator,validate_email
class StandardCollection(models.Model):
name = models.CharField(max_length=150)
manager = models.ForeignKey(User, null=True,on_delete=models.CASCADE)
def __str__(self):
return self.name
class CourseStandard(models.Model):
name = models.CharField(max_length=150)
@@ -2211,6 +2215,14 @@ class CourseStandard(models.Model):
skillclass = models.CharField(max_length=150)
standardcollection = models.ForeignKey(StandardCollection,on_delete=models.CASCADE)
class Meta:
unique_together = ('name','sex','agemin',
'agemax','boatclass','boattype','weightclass','adaptiveclass',
'skillclass','standardcollection')
def __str__(self):
return self.name
registerchoices = (
('windowstart','Start of challenge Window'),
('windowend','End of challenge Window'),