Mercurial > public > sg101
comparison gpp/downloads/admin.py @ 413:6144023ebea8
Downloads admin improvements: don't filter by user or IP address. Made the is_public editable on the change list page.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 07 Apr 2011 23:52:18 +0000 |
parents | d424b8bae71d |
children |
comparison
equal
deleted
inserted
replaced
412:639cfdf59167 | 413:6144023ebea8 |
---|---|
55 | 55 |
56 class DownloadAdmin(admin.ModelAdmin): | 56 class DownloadAdmin(admin.ModelAdmin): |
57 exclude = ('html', ) | 57 exclude = ('html', ) |
58 list_display = ('title', 'user', 'category', 'date_added', 'ip_address', | 58 list_display = ('title', 'user', 'category', 'date_added', 'ip_address', |
59 'hits', 'average_score', 'size', 'is_public') | 59 'hits', 'average_score', 'size', 'is_public') |
60 list_filter = ('date_added', 'is_public', 'category', 'user', 'ip_address') | 60 list_filter = ('date_added', 'is_public', 'category') |
61 list_editable = ('is_public', ) | |
61 date_hierarchy = 'date_added' | 62 date_hierarchy = 'date_added' |
62 ordering = ('-date_added', ) | 63 ordering = ('-date_added', ) |
63 search_fields = ('title', 'description', 'user__username') | 64 search_fields = ('title', 'description', 'user__username') |
64 raw_id_fields = ('user', ) | 65 raw_id_fields = ('user', ) |
65 readonly_fields = ('update_date', ) | 66 readonly_fields = ('update_date', ) |