aboutsummaryrefslogtreecommitdiffstats
path: root/notice/admin.py
blob: 6dcd819f7450b9609c90a0aa49f40c88d7de6235 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -*- coding: utf-8 -*-

from django.contrib import admin
from django.contrib.contenttypes import generic

from notice.models import Notice, NoticeCategory, NoticeAttachment


class NoticeAttachmentInline(generic.GenericTabularInline):
    model = NoticeAttachment


class NoticeAdmin(admin.ModelAdmin):
    inlines = [
        NoticeAttachmentInline,
    ]


## register to admin
admin.site.register(Notice, NoticeAdmin)
admin.site.register(NoticeCategory)
admin.site.register(NoticeAttachment)