it/itf/bestpractices/admin.py
2010-12-07 15:51:24 +01:00

21 lines
505 B
Python

from django.contrib import admin
from models import *
class ImageInline(admin.StackedInline):
model = BestPracticeImage
extra = 2
class LinkInline(admin.StackedInline):
model = BestPracticeLink
extra = 3
class BestPracticeAdmin(admin.ModelAdmin):
inlines = [ImageInline, LinkInline]
list_filter = ['category']
admin.site.register(BestPractice, BestPracticeAdmin)
admin.site.register(BestPracticeCategory)
admin.site.register(BestPracticeImage)
admin.site.register(BestPracticeLink)