List child comments in MoreCommentsJsonTemplate.

This commit is contained in:
Bryce Boe
2011-11-16 00:45:20 -08:00
committed by Max Goodman
parent 3c575d9476
commit 60f704ef89

View File

@@ -369,11 +369,15 @@ class CommentJsonTemplate(ThingJsonTemplate):
class MoreCommentJsonTemplate(CommentJsonTemplate):
_data_attrs_ = dict(id = "_id36",
name = "_fullname")
name = "_fullname",
children = "children")
def kind(self, wrapped):
return "more"
def thing_attr(self, thing, attr):
if attr == 'children':
return [to36(x) for x in thing.children]
if attr in ('body', 'body_html'):
return ""
return CommentJsonTemplate.thing_attr(self, thing, attr)