openbackloggery/collection/figurines/admin.py

18 lines
371 B
Python

from django.contrib import admin
from django.utils.translation import ugettext as _
from figurines.models import Set, Figurine
class FigurineInline(admin.TabularInline):
model = Figurine
fields = ('name', 'wish')
extra = 2
class SetAdmin(admin.ModelAdmin):
list_display = ('name',)
inlines = (FigurineInline,)
admin.site.register(Set, SetAdmin)