src/cm/models.py
changeset 20 23a15100b5d8
parent 17 a4be0b8a905d
child 22 0b8b521da2ce
equal deleted inserted replaced
19:ce175b49de67 20:23a15100b5d8
   197 #        
   197 #        
   198 #        if has_perm(user, 'can_view_unapproved_comment', self.text):
   198 #        if has_perm(user, 'can_view_unapproved_comment', self.text):
   199 #            comments = self.comment_set.all()
   199 #            comments = self.comment_set.all()
   200 #        elif has_perm(user, 'can_view_approved_comment', self.text):
   200 #        elif has_perm(user, 'can_view_approved_comment', self.text):
   201 #            comments = self.comment_set.filter(visible=True)
   201 #            comments = self.comment_set.filter(visible=True)
   202 #        elif has_perm(user, 'can_view_own_comment', self.text):
   202 #        elif has_perm(user, 'can_view_comment_own', self.text):
   203 #            comments = self.comment_set.filter(user=user)
   203 #            comments = self.comment_set.filter(user=user)
   204 #        else:
   204 #        else:
   205 #            return Comment.objects.none() # empty queryset
   205 #            return Comment.objects.none() # empty queryset
   206 #        if filter_reply:
   206 #        if filter_reply:
   207 #            comments = comments.filter)
   207 #            comments = comments.filter)