示例#1
0
def travel_comment(writer):
    comments = CommodityComment.select()
    for com in comments:
        writer.add_document(type=u"CommodityComment",
                            id=unicode(com.commodity.id),
                            title=unicode(com.commodity.name.lower()),
                            content=unicode(com.comment.lower()))
示例#2
0
def comment(comment_id):
    comment = CommodityComment.select().get(id=comment_id)
    return render_template('commodity/item_comment.html',
                            user=g.user,
                            comment=comment)