fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
slugify->slughifi, **kwargs in BookMedia.save
[wolnelektury.git]
/
apps
/
catalogue
/
admin.py
diff --git
a/apps/catalogue/admin.py
b/apps/catalogue/admin.py
index
d11750d
..
050d4e1
100644
(file)
--- 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'):
#}
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
else:
self.fields = None
+ self.readonly_fields = ()
return super(BookAdmin, self).change_view(request, object_id,
extra_context=extra_context)
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')
list_display = ('name', 'type', 'uploaded_at')
ordering = ('name', 'type')
+ search_fields = ('name',)