X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/5e7401098734756927e6d6cf6da891bf26dcdb47..45b0231e99c7f53d29bc3b07a2ce2a0957058265:/catalogue/admin.py diff --git a/catalogue/admin.py b/catalogue/admin.py index 03b72d918..2f5d48ba2 100644 --- a/catalogue/admin.py +++ b/catalogue/admin.py @@ -2,7 +2,7 @@ from django.contrib import admin from newtagging.admin import TaggableModelAdmin -from catalogue.models import Book, Tag +from catalogue.models import Tag, Book, Fragment class TagAdmin(admin.ModelAdmin): @@ -25,6 +25,14 @@ class BookAdmin(TaggableModelAdmin): prepopulated_fields = {'slug': ('title',)} +class FragmentAdmin(TaggableModelAdmin): + tag_model = Tag + + list_display = ('book', 'anchor',) + ordering = ('book', 'anchor',) + + admin.site.register(Tag, TagAdmin) admin.site.register(Book, BookAdmin) +admin.site.register(Fragment, FragmentAdmin)