Ejemplo n.º 1
0
 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,
     )
     '''
Ejemplo n.º 2
0
 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,
     )
     '''
Ejemplo n.º 3
0
 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,
     )
Ejemplo n.º 4
0
 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,
     )