1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-09 12:50:20 +02:00

Add calendar view

This commit is contained in:
Yohann D'ANELLO
2020-10-20 13:06:51 +02:00
parent d1f2402373
commit 168bfc83c9
6 changed files with 84 additions and 41 deletions

View File

@ -13,12 +13,14 @@ from django.urls import reverse_lazy
from django.utils.translation import gettext_lazy as _
from django.views.generic import CreateView, DetailView, FormView, RedirectView, UpdateView
from django.views.generic.edit import FormMixin, ProcessFormView
from django_tables2 import SingleTableView
from magic import Magic
from registration.models import AdminRegistration
from .forms import JoinTeamForm, ParticipationForm, RequestValidationForm, TeamForm, UploadVideoForm,\
ValidateParticipationForm
from .models import Participation, Team, Video
from .models import Participation, Phase, Team, Video
from .tables import CalendarTable
class CreateTeamView(LoginRequiredMixin, CreateView):
@ -274,3 +276,8 @@ class UploadVideoView(LoginRequiredMixin, UpdateView):
def get_success_url(self):
return reverse_lazy("participation:participation_detail", args=(self.object.participation.pk,))
class CalendarView(SingleTableView):
table_class = CalendarTable
model = Phase