From 9508000a92784d1bc1a0da488e7da51842843586 Mon Sep 17 00:00:00 2001 From: sanj Date: Fri, 14 May 2010 08:03:11 +0530 Subject: [PATCH] PadmaVideo model --- itf/festival/admin.py | 12 ++++++++++-- itf/festival/models.py | 7 +++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/itf/festival/admin.py b/itf/festival/admin.py index d249e09..7150825 100755 --- a/itf/festival/admin.py +++ b/itf/festival/admin.py @@ -9,12 +9,19 @@ class ImageInline(admin.StackedInline): model = Image extra = 3 +class PadmaVideoInline(admin.StackedInline): + model = PadmaVideo + extra = 3 + class DocumentInline(admin.StackedInline): model = Document extra = 2 +class PadmaVideoAdmin(admin.ModelAdmin): + pass + class TalkAdmin(admin.ModelAdmin): - inlines = [AudioInline, ImageInline, DocumentInline] + inlines = [AudioInline, ImageInline, DocumentInline, PadmaVideoInline] save_on_top = True list_display = ('__unicode__', 'presenter', 'session',) list_filter = ['session'] @@ -72,7 +79,8 @@ admin.site.register(Comment, CommentAdmin) admin.site.register(Meeting, MeetingAdmin) admin.site.register(Audio, AudioAdmin) admin.site.register(Video, VideoAdmin) -admin.site.register(Image, ImageAdmin) +admin.site.register(Image, ImageAdmin) +admin.site.register(PadmaVideo, PadmaVideoAdmin) admin.site.register(Document) admin.site.register(Project, ProjectAdmin) #admin.site.register(MeetingDay) diff --git a/itf/festival/models.py b/itf/festival/models.py index bb53240..0d1b25c 100644 --- a/itf/festival/models.py +++ b/itf/festival/models.py @@ -94,6 +94,13 @@ class Video(models.Model): def __unicode__(self): return self.title +class PadmaVideo(models.Model): + padma_id = models.CharField(max_length=50) + talk = models.ForeignKey('Talk') + + def __unicode__(self): + return self.padma_id + class Image(models.Model): title = models.CharField(max_length=255) intro = models.TextField(blank=True, null=True)