mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-02-12 11:41:18 +00:00
Compare commits
No commits in common. "bf32c34d4ca0fddf28c2a75f0ebbbdf27c68b5b0" and "41817421332f435deac926f35e95cd08746575a0" have entirely different histories.
bf32c34d4c
...
4181742133
@ -95,7 +95,7 @@ class UploadVideoForm(forms.ModelForm):
|
|||||||
fields = ('link',)
|
fields = ('link',)
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
if Phase.current_phase().phase_number != 1 and Phase.current_phase().phase_number != 4 and self.instance.link:
|
if Phase.current_phase().phase_number != 1 and self.instance.link:
|
||||||
self.add_error("link", _("You can't upload your video after the deadline."))
|
self.add_error("link", _("You can't upload your video after the deadline."))
|
||||||
return super().clean()
|
return super().clean()
|
||||||
|
|
||||||
|
@ -179,6 +179,7 @@ class TeamDetailView(LoginRequiredMixin, FormMixin, ProcessFormView, DetailView)
|
|||||||
return self.handle_request_validation(form)
|
return self.handle_request_validation(form)
|
||||||
elif isinstance(form, ValidateParticipationForm):
|
elif isinstance(form, ValidateParticipationForm):
|
||||||
return self.handle_validate_participation(form)
|
return self.handle_validate_participation(form)
|
||||||
|
return self.form_invalid(form)
|
||||||
|
|
||||||
def handle_request_validation(self, form):
|
def handle_request_validation(self, form):
|
||||||
"""
|
"""
|
||||||
@ -203,7 +204,7 @@ class TeamDetailView(LoginRequiredMixin, FormMixin, ProcessFormView, DetailView)
|
|||||||
mail_plain = render_to_string("participation/mails/request_validation.txt", mail_context)
|
mail_plain = render_to_string("participation/mails/request_validation.txt", mail_context)
|
||||||
mail_html = render_to_string("participation/mails/request_validation.html", mail_context)
|
mail_html = render_to_string("participation/mails/request_validation.html", mail_context)
|
||||||
admin.user.email_user("[Corres2math] Validation d'équipe", mail_plain, html_message=mail_html)
|
admin.user.email_user("[Corres2math] Validation d'équipe", mail_plain, html_message=mail_html)
|
||||||
return super().form_valid(form)
|
return self.form_valid(form)
|
||||||
|
|
||||||
def handle_validate_participation(self, form):
|
def handle_validate_participation(self, form):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user