1 # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 from django.contrib import admin
7 class BookAdmin(admin.ModelAdmin):
8 list_display = ['title', 'public', '_published', '_new_publishable', 'project']
9 list_filter = ['public', '_published', '_new_publishable', 'project']
10 prepopulated_fields = {'slug': ['title']}
11 search_fields = ['title']
14 class TagAdmin(admin.ModelAdmin):
15 list_display = ['name', 'ordering']
16 list_editable = ['ordering']
18 admin.site.register(models.Project)
19 admin.site.register(models.Book, BookAdmin)
20 admin.site.register(models.Chunk)
21 admin.site.register(models.Chunk.tag_model, TagAdmin)
23 admin.site.register(models.Image)
24 admin.site.register(models.Image.tag_model, TagAdmin)