X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/cd330644503795289b6402e3622b5768b2ebed6c..0f2ac86f03177aebee66a3890120d9926272cf27:/src/documents/admin.py diff --git a/src/documents/admin.py b/src/documents/admin.py index 21390a75..673a4684 100644 --- a/src/documents/admin.py +++ b/src/documents/admin.py @@ -2,9 +2,17 @@ # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.contrib import admin +import depot.models from . import models + +class SiteBookInline(admin.TabularInline): + model = depot.models.SiteBook + extra = 0 + + class BookAdmin(admin.ModelAdmin): + inlines = [SiteBookInline] list_display = ['title', 'public', '_published', '_new_publishable', 'project'] list_filter = ['public', '_published', '_new_publishable', 'project'] prepopulated_fields = {'slug': ['title']}