it/itf/app/admin.py

16 lines
371 B
Python
Raw Normal View History

2011-03-06 12:49:58 +00:00
from django.contrib import admin
from models import ModelsModel, ModelSort, ModelExtraButton
class ButtonsInline(admin.StackedInline):
model = ModelExtraButton
extra = 2
class ModelsModelAdmin(admin.ModelAdmin):
inlines = [ButtonsInline]
admin.site.register(ModelsModel, ModelsModelAdmin)
admin.site.register(ModelSort)
admin.site.register(ModelExtraButton)