Exemplo n.º 1
0
 def GET(self, id, page=1):
     account_info = model.get_account(int(id))
     for info in account_info:
         page = int(page)
         perpage = 13
         offset = (page - 1) * perpage
         posts = model.get_list(info.account_id, offset, perpage)
         postcount = model.get_list_num(info.account_id)
         pages = postcount.count / perpage
         if postcount.count % perpage != 0:
             total = 1 + pages
         total = pages
         lastpage = int(page) - 1
         nextpage = int(page) + 1
         page3 = []
         total = pages
         for p in range(0, 6):
             page3.append(p + int(page))
         if page > pages:
             raise web.seeother('/account/$id/$total')
         return render.account(id,
                               posts=posts,
                               pages=page3,
                               total=total,
                               lastpage=lastpage,
                               nextpage=nextpage)
Exemplo n.º 2
0
    def GET(self,id,page=1):
	account_info = model.get_account(int(id))
	for info in account_info:
	    page = int(page)
	    perpage = 13
	    offset = (page -1) * perpage
	    posts = model.get_list(info.account_id,offset,perpage)
	    postcount = model.get_list_num(info.account_id)
	    pages= postcount.count / perpage
	    if postcount.count % perpage != 0:
		total = 1+pages
	    total = pages
	    lastpage = int(page)-1
	    nextpage = int(page)+1
	    page3=[]
	    total=pages
	    for p in range(0,6):
		page3.append(p+int(page))
	    if page > pages:
		raise web.seeother('/account/$id/$total')
	    return render.account(id,posts=posts,pages=page3,total=total,lastpage=lastpage,nextpage=nextpage)
Exemplo n.º 3
0
    def GET(self,id):
	account_info = model.get_account(int(id))
	for info in account_info:
	    list = model.get_list(info.account_id)
	    return render.rss(list)
Exemplo n.º 4
0
 def GET(self, id):
     account_info = model.get_account(int(id))
     for info in account_info:
         list = model.get_list(info.account_id)
         return render.rss(list)