comparison gpp/comments/admin.py @ 365:cdfa3ed59600

Fixing #181; flagged comments need raw_id_fields for the user and comment foreign keys.
author Brian Neal <bgneal@gmail.com>
date Sat, 05 Mar 2011 04:17:43 +0000
parents b4305e18d3af
children
comparison
equal deleted inserted replaced
364:3cf18e6002dd 365:cdfa3ed59600
29 29
30 30
31 class CommentFlagAdmin(admin.ModelAdmin): 31 class CommentFlagAdmin(admin.ModelAdmin):
32 list_display = ('__unicode__', 'flag_date', 'get_comment_url') 32 list_display = ('__unicode__', 'flag_date', 'get_comment_url')
33 actions = ('accept_flags', ) 33 actions = ('accept_flags', )
34 raw_id_fields = ('user', 'comment')
34 35
35 def accept_flags(self, request, qs): 36 def accept_flags(self, request, qs):
36 """This admin action awards a security pin to the user who reported 37 """This admin action awards a security pin to the user who reported
37 the comment and then deletes the flagged comment object. 38 the comment and then deletes the flagged comment object.
38 """ 39 """