it/itf/app/admin.py
2011-03-06 18:19:58 +05:30

16 lines
371 B
Python

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)