it/itf/frontpage/admin.py

27 lines
724 B
Python
Raw Permalink Normal View History

2011-08-01 13:49:19 +00:00
from django.contrib import admin
from models import *
# from forms import ArticleForm
class MenuItemInline(admin.StackedInline):
model = MenuItem
extra = 7
class SliderBoxAdmin(admin.ModelAdmin):
list_display = ('title', 'order',)
list_editable = ['order']
# list_display = ('title', 'date',)
class MenuHeadingAdmin(admin.ModelAdmin):
inlines = [MenuItemInline]
list_display = ('name', 'order',)
list_editable = ['order']
2011-11-01 01:38:22 +00:00
class FrontImageAdmin(admin.ModelAdmin):
2011-11-01 01:49:36 +00:00
list_display = ('__unicode__', 'order',)
2011-11-01 01:47:14 +00:00
list_editable = ['order']
2011-11-01 01:38:22 +00:00
2011-08-01 13:49:19 +00:00
admin.site.register(MenuHeading, MenuHeadingAdmin)
admin.site.register(SliderBox, SliderBoxAdmin)
2011-11-01 01:38:22 +00:00
admin.site.register(FrontImage, FrontImageAdmin)