def getVars(self): vars = WTemplated.getVars(self) newsModule = ModuleHolder().getById("news") vars["news"] = newsModule.getNewsItemsList() vars["tz"] = self._tz return vars
def getVars(self): vars = wcomponents.WTemplated.getVars(self) newsModule = ModuleHolder().getById("news") vars["news"] = newsModule.getNewsItemsList() vars["tz"] = self._tz return vars
def _getTabContent( self, params ): tz = timezone(timezoneUtils.DisplayTZ(self._getAW()).getDisplayTZ()) wc = WUpdateNews() newsModule = ModuleHolder().getById("news") newslist = fossilize(newsModule.getNewsItemsList(), INewsItemFossil, tz=tz) newsTypesList = newsModule.getNewsTypesAsDict() recentDays = newsModule.getRecentDays() pars = {"newslist": newslist, "newsTypesList": newsTypesList, "recentDays": recentDays } return wc.getHTML( pars )
def _getTabContent(self, params): tz = timezone(timezoneUtils.DisplayTZ(self._getAW()).getDisplayTZ()) wc = WUpdateNews() newsModule = ModuleHolder().getById("news") newslist = fossilize(newsModule.getNewsItemsList(), INewsItemFossil, tz=tz) newsTypesList = newsModule.getNewsTypesAsDict() recentDays = newsModule.getRecentDays() pars = { "newslist": newslist, "newsTypesList": newsTypesList, "recentDays": recentDays } return wc.getHTML(pars)