openbackloggery/collection/figurines/admin.py

18 lines
361 B
Python
Raw Normal View History

2017-09-18 19:51:10 +00:00
from django.contrib import admin
from figurines.models import Figurine
from figurines.models import Set
2017-09-18 19:51:10 +00:00
class FigurineInline(admin.TabularInline):
model = Figurine
fields = ('name', 'wish')
extra = 2
class SetAdmin(admin.ModelAdmin):
list_display = ('shortname', 'name')
inlines = (FigurineInline, )
2017-09-18 19:51:10 +00:00
admin.site.register(Set, SetAdmin)