admin.py 737 Bytes
Newer Older
Christophe Siraut's avatar
Christophe Siraut committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
from models import Page, Image, Agenda, Press, Reference, Video, ImagesUpload, File
from django.contrib import admin

#admin.site.register(Page)

class PageAdmin(admin.ModelAdmin):
    list_display = ('title', 'parent', 'in_menu', 'weight')

admin.site.register(Page, PageAdmin)

class ImageAdmin(admin.ModelAdmin):
    list_display = ('title', 'page')

class VideoAdmin(admin.ModelAdmin):
    list_display = ('title', 'page')

class FileAdmin(admin.ModelAdmin):
    list_display = ('title', 'page')

admin.site.register(Image, ImageAdmin)
admin.site.register(Agenda)
admin.site.register(Press)
admin.site.register(Reference)
admin.site.register(Video, VideoAdmin)
#admin.site.register(File, FileAdmin)
admin.site.register(ImagesUpload)