def render_comment_list(self, context): '''Render list of comments for given object''' obj = self.get_object(context) qs = Comment.all().filter("obj =", obj) return render_to_string("comments/block/comment_list", {'comment_list': list(qs)}, context_instance = context)
def get_comment_list(self, context): '''Get list of comments for given object''' obj = self.get_object(context) qs = Comment.all().filter("obj =", obj) context[self.varname] = list(qs) return ''
def get_comment_count(self, context): '''Get total count of comments for given object''' obj = self.get_object(context) qs = Comment.all().filter("obj =", obj) context[self.varname] = qs.count() return ''