def remove_kds_post(request): user_session =request.session post_url = request.POST['url'] print 'post_url1:',post_url if post_url: post_url=post_url.split('/')[-1] print 'post_url:',post_url res=mdb.delete_post(post_url,'kds') print 'res:',res return HttpResponse(res)
def remove_tieba_post(request): """ 删除帖子 """ user_session =request.session post_url = request.POST['url'] print 'post_url:',post_url if post_url: post_url=post_url.split('/')[-1] print 'post_url:',post_url res=mdb.delete_post(post_url,'tieba') print 'res:',res return HttpResponse(res)