X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/8559c95597de98e8f6c580e97224ed3ecc9dc5c0..0cae17bec6d31806615fae59a5b3945016285fbe:/catalogue/admin.py?ds=sidebyside diff --git a/catalogue/admin.py b/catalogue/admin.py deleted file mode 100644 index 2afc794be..000000000 --- a/catalogue/admin.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -from django.contrib import admin -from django import forms -from django.utils.safestring import mark_safe -from django.utils.translation import ugettext_lazy as _ - -from newtagging.admin import TaggableModelAdmin -from catalogue.models import Book, Tag - - -class TagAdmin(admin.ModelAdmin): - list_display = ('name', 'slug', 'sort_key', 'category', 'has_description',) - list_filter = ('category',) - search_fields = ('name',) - ordering = ('name',) - - prepopulated_fields = {'slug': ('name',), 'sort_key': ('name',),} - radio_fields = {'category': admin.HORIZONTAL} - -admin.site.register(Tag, TagAdmin) - - -class BookAdmin(TaggableModelAdmin): - tag_model = Tag - - list_display = ('title', 'slug', 'has_pdf_file', 'has_odt_file', 'has_html_file', 'has_description',) - search_fields = ('title',) - ordering = ('title',) - - prepopulated_fields = {'slug': ('title',)} - -admin.site.register(Book, BookAdmin) -