Esempio n. 1
0
def tu_manage(request,page=1):
    """
    图片列表
    """
    page = int(page)
    img_list = []
    img_list = mdb.get_tu(page,'jietup',30)
    print img_list
    return render('tu_manage.html',{'img_list':img_list,'manage_tu':'active','frontpage':page-1,'nextpage':page+1})
Esempio n. 2
0
def tu(request,page=1):
    """
    图片列表
    """
    #pic_url = '71cf3bc79f3df8dc7fa3ae06cd11728b4610288e.jpg.jpg'
    #return render('tu.html',{'src':'http://imgsrc.baidu.com/forum/pic/item/'+pic_url})
    user_session = request.session
    username = user_session.get('name',None)
    page = int(page)
    img_list = []
    img_list = mdb.get_tu(page,'jietup',24)
    #img_list = [{'post_url':a['post_url'],'url':a['url']} for a in img_list]
    print img_list
    return render('tu.html',{'img_list':img_list,'tu':'active','frontpage':page-1,'nextpage':page+1,'username':username})