Esempio n. 1
0
def get_kds_post(request,post_url):
    print "post_url:",post_url
    reply_info=get_tieba_post_reply(post_url+'.html','kds',mdb.debug_flag)
    hot_post = mdb.get_hot_post('tieba')
    if reply_info:
        return render('content.html',{'data':reply_info,'title':reply_info['title'],'floor':1,'hot_post':hot_post})
    else:
        return HttpResponseRedirect('/kds/1/')
Esempio n. 2
0
def get_filter_post(request,post_url):
    """
    返回被和谐的帖子
    """
    print "post_url:",post_url
    reply_info=get_tieba_post_reply(int(post_url),'tieba',-9)
    hot_post = mdb.get_hot_post('tieba')
    if reply_info:
        return render('tieba.html',{'data':reply_info,'title':reply_info['title'],'floor':1,'hot_post':hot_post})
    else:
        return HttpResponseRedirect('/real/1/')
Esempio n. 3
0
def get_tieba_post(request,post_url):
    """
    返回帖子内容
    """
    user_session =request.session 
    print user_session.keys()
    print 'user_session is_login:'******'is_login',0)
    print 'user_sessionid:',user_session.session_key
    print "post_url:",post_url
    reply_info=get_tieba_post_reply(int(post_url),'tieba',mdb.debug_flag)
    hot_post = mdb.get_hot_post('tieba')
    if reply_info:
        return render('content.html',{'data':reply_info,'title':reply_info['title'],'floor':1,'hot_post':hot_post,'tieba':True})
    else:
        return HttpResponseRedirect('/real/1/')