fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Made short text fragment text shorter.
[wolnelektury.git]
/
catalogue
/
admin.py
diff --git
a/catalogue/admin.py
b/catalogue/admin.py
index
03b72d9
..
2f5d48b
100644
(file)
--- a/
catalogue/admin.py
+++ b/
catalogue/admin.py
@@
-2,7
+2,7
@@
from django.contrib import admin
from newtagging.admin import TaggableModelAdmin
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):
class TagAdmin(admin.ModelAdmin):
@@
-25,6
+25,14
@@
class BookAdmin(TaggableModelAdmin):
prepopulated_fields = {'slug': ('title',)}
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(Tag, TagAdmin)
admin.site.register(Book, BookAdmin)
+admin.site.register(Fragment, FragmentAdmin)