blob: bed31e4fb605a360c419396ebda87a35b4e54ccb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# -*- 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)
|