openbackloggery/collection/figurines/admin.py

18 lines
371 B
Python
Raw Normal View History

2017-09-18 19:51:10 +00:00
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)