Ticket #4189: comments.py.diff
File comments.py.diff, 1.1 KB (added by , 18 years ago) |
---|
-
django/contrib/comments/templatetags/comments.py
109 109 'site__id__exact': settings.SITE_ID, 110 110 } 111 111 kwargs.update(self.extra_kwargs) 112 comment_list = get_list_function(**kwargs).order_by(self.ordering + 'submit_date').select_related() 112 113 if not self.free and settings.COMMENTS_BANNED_USERS_GROUP: 113 kwargs['select'] = {'is_hidden': 'user_id IN (SELECT user_id FROM auth_user_groups WHERE group_id = %s)' % settings.COMMENTS_BANNED_USERS_GROUP} 114 comment_list = get_list_function(**kwargs).order_by(self.ordering + 'submit_date').select_related() 114 comment_list = comment_list.extra(select={'is_hidden': 'user_id IN (SELECT user_id FROM auth_user_groups WHERE group_id = %s)' % settings.COMMENTS_BANNED_USERS_GROUP}) 115 115 116 116 if not self.free: 117 117 if context.has_key('user') and context['user'].is_authenticated():