Mercurial > public > sg101
comparison gpp/forums/admin.py @ 465:79d454ff2de0
Add raw_id_fields to the FlaggedPostAdmin.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 09 Jul 2011 02:28:33 +0000 |
parents | 7e19180b128d |
children | 9e42e6618168 |
comparison
equal
deleted
inserted
replaced
464:bba1782992eb | 465:79d454ff2de0 |
---|---|
49 ordering = ('-creation_date', ) | 49 ordering = ('-creation_date', ) |
50 save_on_top = True | 50 save_on_top = True |
51 | 51 |
52 | 52 |
53 class FlaggedPostAdmin(admin.ModelAdmin): | 53 class FlaggedPostAdmin(admin.ModelAdmin): |
54 list_display = ('__unicode__', 'flag_date', 'get_post_url') | 54 list_display = ['__unicode__', 'flag_date', 'get_post_url'] |
55 actions = ('accept_flags', ) | 55 actions = ['accept_flags'] |
56 raw_id_fields = ['post', 'user', ] | |
56 | 57 |
57 def accept_flags(self, request, qs): | 58 def accept_flags(self, request, qs): |
58 """This admin action awards a security pin to the user who reported | 59 """This admin action awards a security pin to the user who reported |
59 the post and then deletes the flagged post object. | 60 the post and then deletes the flagged post object. |
60 """ | 61 """ |