예제 #1
0
    def get(self, catagory=0):
        spec = dict()
        if catagory:
            spec.update(catagory=int(catagory))

        news_list = News.news(spec=spec)

        self.render(news_list=news_list)
예제 #2
0
    def get(self, catagory):
        if catagory == 'startup':
            catagory = const.NEWS_CATAGORY.STARTUP
        else:
            catagory = const.NEWS_CATAGORY.NEWS

        spec = dict(catagory=catagory)
        title = const.NEWS_CATAGORY_CN.get(catagory)
        li = News.news(spec=spec)

        self.render(li=li, title=title)