def get(self, input): inputImf = input[::1] inputDict = self.getImf(inputImf) articlesType = inputDict['articlesType'] startPage = inputDict['startPage'] startPageInt = common.str2Int(startPage) listArticles = self.getArticles(articlesType, startPageInt, config.pageSize) themeTitle = self.getThemeTitle(articlesType) sum = self.getListArticlesSum(articlesType) #listArticles = self.addArticles_test(listArticles, config.times) pages = self.getEndPage(startPageInt, sum) self.render( "list.html", listArticles=listArticles, themeTitle=themeTitle, pages=pages, urls=config.urls, articlesType=articlesType, ) '''
def get(self, input): inputImf = input[::1] inputDict = self.getImf(inputImf) articlesType = inputDict['articlesType'] startPage = inputDict['startPage'] startPageInt = common.str2Int(startPage) themeArticles = self.getThemeArticles_test() listArticles = self.getArticles(themeArticles, int(articlesType)) listArticles = self.addArticles_test(listArticles, config.times) startNum = (startPageInt - 1) * config.pageSize endNum = self.getShowArticlesNum(startNum, len(listArticles)) themeName = self.getThemeName(articlesType) pages = self.getEndPage(startPageInt, len(listArticles)) self.render( "list.html", listArticles=listArticles, start=startNum, end=endNum, themeName=themeName, pages=pages, sum=len(listArticles), urls=config.urls, articlesType=articlesType, )
def get(self, input): inputImf = input[::1] inputDict = self.getImf(inputImf) articlesType = inputDict['articlesType'] startPage = inputDict['startPage'] startPageInt = common.str2Int(startPage) themeArticles = self.getThemeArticles_test() listArticles = self.getArticles(themeArticles, int(articlesType)) listArticles = self.addArticles_test(listArticles,config.times) startNum = (startPageInt-1)*config.pageSize endNum = self.getShowArticlesNum(startNum, len(listArticles)) themeName = self.getThemeName(articlesType) pages = self.getEndPage(startPageInt, len(listArticles)) self.render( "list.html", listArticles=listArticles, start=startNum, end=endNum, themeName=themeName, pages=pages, sum=len(listArticles), urls=config.urls, articlesType=articlesType, )