it/itf/bestpractices/admin.py

27 lines
660 B
Python
Raw Normal View History

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
2011-03-06 12:42:33 +00:00
class StoryInline(admin.StackedInline):
model = BestPracticeStory
extra = 3
2010-12-07 14:51:24 +00:00
class LinkInline(admin.StackedInline):
model = BestPracticeLink
extra = 3
class BestPracticeAdmin(admin.ModelAdmin):
2011-03-06 12:42:33 +00:00
inlines = [ImageInline, LinkInline, StoryInline]
2010-12-07 14:51:24 +00:00
list_filter = ['category']
admin.site.register(BestPractice, BestPracticeAdmin)
admin.site.register(BestPracticeCategory)
admin.site.register(BestPracticeImage)
admin.site.register(BestPracticeLink)
2011-01-19 10:10:29 +00:00
admin.site.register(Guideline)
admin.site.register(Glossary)