it/itf/bestpractices/admin.py

23 lines
566 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
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)
2011-01-19 10:10:29 +00:00
admin.site.register(Guideline)
admin.site.register(Glossary)