From: Radek Czajka Date: Tue, 1 Feb 2011 15:57:42 +0000 (+0100) Subject: book admin title readonly in basic mode, requirements-test fix X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/21df6da0980f00387d3d802aabe2b995a9c2efa4 book admin title readonly in basic mode, requirements-test fix --- 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) diff --git a/requirements-test.txt b/requirements-test.txt index f3c7e8e6f..98c20644a 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1 +1,2 @@ nose +django-nose