Пример #1
0
    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
Пример #2
0
 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))
Пример #3
0
 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)
Пример #4
0
 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)