Mercurial > public > sg101
comparison gpp/downloads/admin.py @ 8:d6f3c38e8f50
Removed markitUp! from the downloads admin. It was looking weird. Try it without it.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 12 Apr 2009 00:34:08 +0000 |
parents | b6263ac72052 |
children | 341759e1cda1 |
comparison
equal
deleted
inserted
replaced
7:ca66189c7c44 | 8:d6f3c38e8f50 |
---|---|
8 from downloads.models import Category | 8 from downloads.models import Category |
9 from downloads.models import AllowedExtension | 9 from downloads.models import AllowedExtension |
10 from downloads.models import VoteRecord | 10 from downloads.models import VoteRecord |
11 | 11 |
12 class DownloadAdmin(admin.ModelAdmin): | 12 class DownloadAdmin(admin.ModelAdmin): |
13 exclude = ('html', ) | 13 exclude = ('html', ) |
14 list_display = ('title', 'user', 'category', 'date_added', 'ip_address', | 14 list_display = ('title', 'user', 'category', 'date_added', 'ip_address', |
15 'hits', 'average_score', 'size', 'is_public') | 15 'hits', 'average_score', 'size', 'is_public') |
16 list_filter = ('date_added', 'is_public', 'category', 'user', 'ip_address') | 16 list_filter = ('date_added', 'is_public', 'category', 'user', 'ip_address') |
17 date_hierarchy = 'date_added' | 17 date_hierarchy = 'date_added' |
18 ordering = ('-date_added', ) | 18 ordering = ('-date_added', ) |
19 search_fields = ('title', 'description', 'user__username') | 19 search_fields = ('title', 'description', 'user__username') |
20 raw_id_fields = ('user', ) | 20 raw_id_fields = ('user', ) |
21 save_on_top = True | 21 save_on_top = True |
22 | |
23 class Media: | |
24 css = { | |
25 'all': settings.GPP_THIRD_PARTY_CSS['markitup'], | |
26 } | |
27 js = settings.GPP_THIRD_PARTY_JS['jquery'] + \ | |
28 settings.GPP_THIRD_PARTY_JS['markitup'] + \ | |
29 ('js/downloads_admin.js', ) | |
30 | 22 |
31 | 23 |
32 class VoteRecordAdmin(admin.ModelAdmin): | 24 class VoteRecordAdmin(admin.ModelAdmin): |
33 list_display = ('user', 'download', 'vote_date') | 25 list_display = ('user', 'download', 'vote_date') |
34 list_filter = ('user', 'download') | 26 list_filter = ('user', 'download') |
35 date_hierarchy = 'vote_date' | 27 date_hierarchy = 'vote_date' |
36 | 28 |
37 | 29 |
38 admin.site.register(Download, DownloadAdmin) | 30 admin.site.register(Download, DownloadAdmin) |
39 admin.site.register(Category) | 31 admin.site.register(Category) |
40 admin.site.register(AllowedExtension) | 32 admin.site.register(AllowedExtension) |
41 admin.site.register(VoteRecord, VoteRecordAdmin) | 33 admin.site.register(VoteRecord, VoteRecordAdmin) |
34 | |
35 # vim: ts=4 sw=4 |