first version of virtualsessions_view - not working
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user