nk20/apps/activity/views.py

32 lines
722 B
Python
Raw Normal View History

2020-03-01 16:16:38 +00:00
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
2020-03-26 23:40:35 +00:00
from django.views.generic import CreateView, DetailView, UpdateView, TemplateView
2020-03-01 16:16:38 +00:00
from django_tables2.views import SingleTableView
2020-03-26 23:40:35 +00:00
from .models import Activity
2020-03-01 16:16:38 +00:00
class ActivityCreateView(CreateView):
model = Activity
template_name = 'activity_create.html'
2020-03-26 23:40:35 +00:00
2020-03-01 16:16:38 +00:00
class ActivityListView(SingleTableView):
model = Activity
template_name = 'activity_list.html'
2020-03-26 23:40:35 +00:00
2020-03-01 16:16:38 +00:00
class ActivityDetailView(DetailView):
model = Activity
template_name = 'activty_detail.html'
2020-03-26 23:40:35 +00:00
2020-03-01 16:16:38 +00:00
class ActivityUpdateView(UpdateView):
model = Activity
template_name = 'activity_update.html'
2020-03-26 23:40:35 +00:00
2020-03-01 16:16:38 +00:00
class ActivityEntryView(TemplateView):
pass