Exemplo n.º 1
0
def delete(request):
    weibo_id = int(request.query['weibo_id'])
    Weibo.delete(weibo_id)
    cs = Comment.all(weibo_id=weibo_id)
    for c in cs:
        c.delete()
    return redirect('/weibo/index')
Exemplo n.º 2
0
def delete(request):
    weibo_id = int(request.query['weibo_id'])
    print('shuchu')
    Weibo.delete(weibo_id)
    cs = Comment.all(weibo_id=int(weibo_id))
    for c in cs:
        c.delete(c.id)

    return redirect('/weibo/index')