X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/bc96fba70ed95dcc6859481bd07c793956e6979b..21df6da0980f00387d3d802aabe2b995a9c2efa4:/apps/catalogue/admin.py?ds=sidebyside diff --git a/apps/catalogue/admin.py b/apps/catalogue/admin.py index d11750dbd..050d4e197 100644 --- a/apps/catalogue/admin.py +++ b/apps/catalogue/admin.py @@ -33,9 +33,11 @@ class BookAdmin(TaggableModelAdmin): #} print request.GET.keys() if not request.GET.has_key('advanced'): - self.fields = ['title', 'description', 'gazeta_link', 'wiki_link', 'pdf_file', 'medias'] + self.fields = ('title', 'description', 'gazeta_link', 'wiki_link', 'pdf_file', 'medias',) + self.readonly_fields = ('title', 'slug',) else: self.fields = None + self.readonly_fields = () return super(BookAdmin, self).change_view(request, object_id, extra_context=extra_context) @@ -53,6 +55,7 @@ class MediaAdmin(admin.ModelAdmin): list_display = ('name', 'type', 'uploaded_at') ordering = ('name', 'type') + search_fields = ('name',)