blechreiz-website/scoremanager/admin.py

22 lines
499 B
Python
Raw Normal View History

2014-02-15 18:07:00 +01:00
from django.contrib import admin
from scoremanager.models import Piece, Score, Recording, BookLocation
class ScoreInline( admin.StackedInline ):
model = Score
extra = 1
class RecordingInline( admin.StackedInline ):
model = Recording
extra = 1
class BookLocationInline( admin.StackedInline ):
model = BookLocation
extra = 1
class PieceAdmin (admin.ModelAdmin):
inlines = (BookLocationInline, ScoreInline, RecordingInline )
admin.site.register( Piece, PieceAdmin )