コード例 #1
0
ファイル: admin.py プロジェクト: broodjeaap/GAEBlogger
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()
コード例 #2
0
ファイル: blog.py プロジェクト: broodjeaap/GAEBlogger
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