Merge branch 'release/v12.97'
This commit is contained in:
@@ -80,7 +80,6 @@ def send_template_email(from_email,to_email,subject,
|
||||
text_content = textify(html_content)
|
||||
# html_content = newlinetobr(html_content)
|
||||
|
||||
print(kwargs['bcc'])
|
||||
|
||||
if 'bcc' in kwargs and 'cc' in kwargs:
|
||||
msg = EmailMultiAlternatives(subject, text_content, from_email, to_email,cc=kwargs['cc'],
|
||||
|
||||
@@ -1026,7 +1026,13 @@ def race_can_edit(r,race):
|
||||
startdatetime = pytz.timezone(race.timezone).localize(
|
||||
startdatetime
|
||||
)
|
||||
if timezone.now()<startdatetime:
|
||||
end_time = race.end_time
|
||||
end_date = race.enddate
|
||||
enddatetime = datetime.combine(end_date,end_time)
|
||||
enddatetime = pytz.timezone(race.timezone).localize(
|
||||
enddatetime
|
||||
)
|
||||
if timezone.now()<enddatetime:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
@@ -1223,7 +1223,6 @@ def virtualevent_view(request,id=0):
|
||||
|
||||
comments = PlannedSessionComment.objects.filter(plannedsession=race).order_by("created")
|
||||
|
||||
|
||||
return render(request,'virtualevent.html',
|
||||
{
|
||||
'coursescript':script,
|
||||
@@ -2565,8 +2564,15 @@ def virtualevent_edit_view(request,id=0):
|
||||
startdatetime
|
||||
)
|
||||
|
||||
if timezone.now() > startdatetime:
|
||||
messages.error(request,"You cannot edit a race after the start of the race window")
|
||||
end_time = race.end_time
|
||||
end_date = race.enddate
|
||||
enddatetime = datetime.datetime.combine(end_date,end_time)
|
||||
enddatetime = pytz.timezone(race.timezone).localize(
|
||||
enddatetime
|
||||
)
|
||||
|
||||
if timezone.now() > enddatetime:
|
||||
messages.error(request,"You cannot edit a race after the end of the race window")
|
||||
url = reverse('virtualevent_view',
|
||||
kwargs={
|
||||
'id':race.id,
|
||||
@@ -2658,8 +2664,15 @@ def indoorvirtualevent_edit_view(request,id=0):
|
||||
startdatetime
|
||||
)
|
||||
|
||||
if timezone.now() > startdatetime:
|
||||
messages.error(request,"You cannot edit a race after the start of the race window")
|
||||
end_time = race.end_time
|
||||
end_date = race.enddate
|
||||
enddatetime = datetime.datetime.combine(end_date,end_time)
|
||||
enddatetime = pytz.timezone(race.timezone).localize(
|
||||
enddatetime
|
||||
)
|
||||
|
||||
if timezone.now() > enddatetime:
|
||||
messages.error(request,"You cannot edit a race after the end of the race window")
|
||||
url = reverse('virtualevent_view',
|
||||
kwargs={
|
||||
'id':race.id,
|
||||
|
||||
Reference in New Issue
Block a user