1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-07 01:44:00 +02:00

Upload photo authorizations

This commit is contained in:
Yohann D'ANELLO
2020-09-24 22:40:10 +02:00
parent e1ca18085a
commit 468295f648
11 changed files with 148 additions and 36 deletions

View File

@ -10,7 +10,8 @@ from django.utils.http import urlsafe_base64_decode
from django.utils.translation import gettext_lazy as _
from django.views.generic import CreateView, DetailView, RedirectView, TemplateView, UpdateView
from .forms import CoachRegistrationForm, SignupForm, StudentRegistrationForm, UserForm
from .forms import CoachRegistrationForm, PhotoAuthorizationForm, SignupForm, StudentRegistrationForm, UserForm
from .models import StudentRegistration
class SignupView(CreateView):
@ -156,3 +157,12 @@ class UserUpdateView(LoginRequiredMixin, UpdateView):
def get_success_url(self):
return reverse_lazy("registration:user_detail", args=(self.object.pk,))
class UserUploadPhotoAuthorizationView(LoginRequiredMixin, UpdateView):
model = StudentRegistration
form_class = PhotoAuthorizationForm
template_name = "registration/upload_photo_authorization.html"
def get_success_url(self):
return reverse_lazy("registration:user_detail", args=(self.object.user.pk,))