Beispiel #1
0
def deleteComment(key):
    comment = misc.getComment(key)
    if comment.children:
        for commentKey in comment.children:
            deleteComment(misc.getComment(commentKey).key())
    memcache.delete(str(comment.key()))
    comment.delete()
Beispiel #2
0
def printComments(comments,switch=False):
    if(switch):
        ret = "<div class='articleCommentsSwitch'>"
    else:
        ret = "<div class='articleComments'>"
    for key in comments:
        comment = misc.getComment(key)
        ret += printComment(comment)
        if comment.children:
            ret += printComments(comment.children,(not switch))
    ret += "</div>"
    return ret