def post_likes(self, post_id):
# gets the metadata about the datastor
kinds = metadata.get_kinds()
# checks to see if any likes exist and if so displays them
if u'PostLike' in kinds:
likes = db.GqlQuery("SELECT * "
"FROM PostLike "
"WHERE ANCESTOR IS :1",
post_key(post_id)).count()
else:
likes = 0
return likes
评论列表
文章目录