2010-12-06 22:33:00 +00:00
|
|
|
from django.contrib import admin
|
|
|
|
from models import *
|
|
|
|
|
2010-12-07 14:51:24 +00:00
|
|
|
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)
|