mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2024-12-26 06:22:20 +00:00
21 lines
661 B
Python
21 lines
661 B
Python
from django.contrib.auth.mixins import LoginRequiredMixin
|
|
from django.utils.translation import gettext_lazy as _
|
|
from django.views.generic import CreateView, FormView
|
|
|
|
from participation.forms import TeamForm, JoinTeamForm
|
|
from participation.models import Team
|
|
|
|
|
|
class CreateTeamView(LoginRequiredMixin, CreateView):
|
|
model = Team
|
|
form_class = TeamForm
|
|
extra_context = dict(title=_("Create team"))
|
|
template_name = "participation/create_team.html"
|
|
|
|
|
|
class JoinTeamView(LoginRequiredMixin, FormView):
|
|
model = Team
|
|
form_class = JoinTeamForm
|
|
extra_context = dict(title=_("Join team"))
|
|
template_name = "participation/create_team.html"
|