X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/5e7401098734756927e6d6cf6da891bf26dcdb47..6fe9513613b3d0dcfc934c41a5bfa9b71f341b06:/catalogue/admin.py?ds=inline 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)