22 lines
499 B
Python
22 lines
499 B
Python
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 ) |