def GET(self, data): #t = web.template.frender('templates/index.html') render = web.template.render("templates/", base="template") data = web.input() news = ctrl.getNewsById(data['id']) stations = ctrl.getStations() print '@' * 50 print 'news:', news['title'] print 'stations:', stations return render.sigle(news, stations)
def GET(self, data): data = web.input() station_id = data['station_id'] #t = web.template.frender('templates/index.html') render = web.template.render("templates/", base="template") #station_name = ctrl.getStationName(station_id) news = ctrl.getNews(int(station_id)) stations = ctrl.getStations() station_name = news['station'] newslist = news['news'] return render.items(station_name, newslist, stations)