Private
Public Access
1
0

first version of virtualsessions_view - not working

This commit is contained in:
Sander Roosendaal
2018-04-12 17:05:37 +02:00
parent 97cce15d68
commit be1f17fde3
7 changed files with 72 additions and 5 deletions

View File

@@ -1056,14 +1056,25 @@ class PlannedSession(models.Model):
super(PlannedSession,self).save(*args, **kwargs)
class PopUpRegatta(PlannedSession):
from django.core.validators import RegexValidator,validate_email
class VirtualRace(PlannedSession):
has_registration = models.BooleanField(default=False)
registration_closure = models.DateTimeField(blank=True,null=True)
evaluation_closure = models.DateTimeField(blank=True,null=True)
start_time = models.TimeField(blank=True,null=True)
end_time = models.TimeField(blank=True,null=True)
country = models.CharField(max_length=100,blank=True)
phone_regex = RegexValidator(
regex=r'^\+?1?\d{9,15}$',
message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed."
)
contact_phone = models.CharField(validators=[phone_regex], max_length=17, blank=True)
contact_email = models.EmailField(max_length=254,blank=True,
validators=[validate_email])
# Date input utility
class DateInput(forms.DateInput):