1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-26 19:02:21 +00:00
plateforme-corres2math/apps/participation/views.py

21 lines
661 B
Python
Raw Normal View History

2020-09-22 18:41:42 +00:00
from django.contrib.auth.mixins import LoginRequiredMixin
from django.utils.translation import gettext_lazy as _
from django.views.generic import CreateView, FormView
2020-09-21 13:41:55 +00:00
2020-09-22 18:41:42 +00:00
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"