def count_comments_handler(sender, **kwargs):
 comment = kwargs['comment']
 if comment.is_public:
  entry = comment.content_object
  if isinstance(entry, Entry):
   entry.comment_count = (F('comment_count') + 1)
   entry.save(update_fields=['comment_count'])

def count_comments_handler ( sender , ** kwargs ) : comment = kwargs [ 'comment' ] if comment . is_public : entry = comment . content_object if isinstance ( entry , Entry ) : entry . comment_count = ( F ( 'comment_count' ) + 1 ) entry . save ( update_fields = [ 'comment_count' ] )
update entry .