race registration rules more flexible
This commit is contained in:
@@ -1059,9 +1059,19 @@ class PlannedSession(models.Model):
|
||||
super(PlannedSession,self).save(*args, **kwargs)
|
||||
|
||||
from django.core.validators import RegexValidator,validate_email
|
||||
|
||||
|
||||
registerchoices = (
|
||||
('windowstart','Start of Race Window'),
|
||||
('windowend','End of Race Window'),
|
||||
('deadline','Evaluation Closure Deadline'),
|
||||
('manual','Manual - select below'),
|
||||
)
|
||||
|
||||
class VirtualRace(PlannedSession):
|
||||
has_registration = models.BooleanField(default=False)
|
||||
# has_registration = models.BooleanField(default=False)
|
||||
registration_form = models.CharField(max_length=100,
|
||||
default='windowstart',
|
||||
choices=registerchoices)
|
||||
registration_closure = models.DateTimeField(blank=True,null=True)
|
||||
evaluation_closure = models.DateTimeField(blank=True,null=True)
|
||||
start_time = models.TimeField(blank=True,null=True)
|
||||
@@ -1137,6 +1147,7 @@ class VirtualRaceForm(ModelForm):
|
||||
course = forms.ModelChoiceField(queryset = GeoCourse.objects, empty_label=None)
|
||||
registration_closure = forms.SplitDateTimeField(widget=AdminSplitDateTime(),required=False)
|
||||
evaluation_closure = forms.SplitDateTimeField(widget=AdminSplitDateTime(),required=True)
|
||||
|
||||
|
||||
class Meta:
|
||||
model = VirtualRace
|
||||
@@ -1146,7 +1157,8 @@ class VirtualRaceForm(ModelForm):
|
||||
'start_time',
|
||||
'enddate',
|
||||
'end_time',
|
||||
'has_registration',
|
||||
# 'has_registration',
|
||||
'registration_form',
|
||||
'registration_closure',
|
||||
'evaluation_closure',
|
||||
'course',
|
||||
|
||||
Reference in New Issue
Block a user