diff options
Diffstat (limited to 'schedule/admin.py')
-rw-r--r-- | schedule/admin.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/schedule/admin.py b/schedule/admin.py new file mode 100644 index 0000000..4b8ed5c --- /dev/null +++ b/schedule/admin.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + +from django.contrib import admin +from django.contrib.contenttypes import generic + +from schedule.models import Event, EventAttachment + + +class EventAttachmentInline(generic.GenericTabularInline): + model = EventAttachment + +class EventAdmin(admin.ModelAdmin): + inlines = [ + EventAttachmentInline, + ] + + +# Register models to admin +admin.site.register(Event, EventAdmin) +admin.site.register(EventAttachment) + |