X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/5e7401098734756927e6d6cf6da891bf26dcdb47..14b70eccc2fec2c214671ca2aeb169baf40dacf2:/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)