PadmaVideo model

This commit is contained in:
sanj 2010-05-14 08:03:11 +05:30
parent fb0bff0fc4
commit 9508000a92
2 changed files with 17 additions and 2 deletions

View File

@ -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)

View File

@ -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)