admin.py 471 Bytes
Newer Older
Thom Wiggers's avatar
Thom Wiggers committed
1
2
3
4
from django.contrib import admin

from . import models

Thom Wiggers's avatar
Thom Wiggers committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

@admin.register(models.Committee)
class CommitteeAdmin(admin.ModelAdmin):
    list_filter = ('until',)

    def get_queryset(self, request):
        qs = super().get_queryset(request)
        return qs.exclude(board__is_board=True)


@admin.register(models.Board)
class BoardAdmin(admin.ModelAdmin):
    pass


@admin.register(models.CommitteeMembership)
class CommitteeMembershipAdmin(admin.ModelAdmin):
    pass