X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/dd69c250f4c19359906d2c44cd2da07b11664280..21df6da0980f00387d3d802aabe2b995a9c2efa4:/apps/catalogue/admin.py?ds=sidebyside diff --git a/apps/catalogue/admin.py b/apps/catalogue/admin.py index 94f8f302d..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)