diff options
author | Weitian LI <liweitianux@gmail.com> | 2014-06-24 17:14:18 +0800 |
---|---|---|
committer | Weitian LI <liweitianux@gmail.com> | 2014-06-24 17:14:18 +0800 |
commit | c5997ab8c15537a4744f80c7c9ce2b177d708939 (patch) | |
tree | bf764e979b21003f65d7297ab2c169623002da71 /schedule/admin.py | |
parent | 3961e2bdfa2cb946f1bd367c9a7a392528bbaeef (diff) | |
download | django-skaschool-c5997ab8c15537a4744f80c7c9ce2b177d708939.tar.bz2 |
Added app schedule.
* Added app schedule, largely based on 'notice' app
* TODO: views and templates
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) + |