def get(self): userinfo = get_user_info(self) curpath = self.get_argument("curpath") # print(userinfo) self.render("upload.html", userinfo=userinfo, curpath=curpath, useage=get_disk_usage(self, curpath)) pass
def get(self): curpath = self.get_argument('curpath', None) if curpath is None: curpath = 'public' # self.clear_cookie(SESSION_ID) # self.redirect('/login') userlist = get_user_all(self) userinfo = get_user_info(self) self.render("manage.html", users=userlist, userinfo=userinfo, curpath=curpath, useage=get_disk_usage(self, curpath))
def post(self): curpage = int(self.get_argument("page", "0")) curpath = self.get_argument('curpath', None) offset = curpage * 50 historylist, count = get_history_all(self, offset) # print(len(historylist)) userinfo = get_user_info(self) self.render("history.html", historys=historylist, userinfo=userinfo, curpath=curpath, useage=get_disk_usage(self, curpath), page=curpage, total=count)
def get(self): curpath = self.get_argument('curpath', None) curpage = int(self.get_argument("page", "0")) if curpage <= 0: curpage = 1 if curpath is None: curpath = 'public' offset = (curpage - 1) * 50 historylist, count = get_history_all(self, offset) weblog.info("history page:{} total:{}".format(len(historylist), count)) pages = cal_page_from_total(count) if curpage > pages: curpage = pages userinfo = get_user_info(self) self.render("history.html", historys=historylist, userinfo=userinfo, curpath=curpath, useage=get_disk_usage(self, curpath), page=curpage, total=pages)