group.py 525 Bytes
Newer Older
1
2
3
4
5
from django.views.generic.edit import UpdateView
from django.views.generic import ListView

from core.models import Group
from core.views.forms import GroupEditForm
6
from core.views import CanEditMixin
7

8
class GroupListView(CanEditMixin, ListView):
9
10
11
12
    """
    Displays the group list
    """
    model = Group
Skia's avatar
Skia committed
13
    template_name = "core/group_list.jinja"
14

15
class GroupEditView(CanEditMixin, UpdateView):
16
17
    model = Group
    pk_url_kwarg = "group_id"
Skia's avatar
Skia committed
18
    template_name = "core/group_edit.jinja"
19
20
    form_class = GroupEditForm