def render_page(self,request,logo): error = False events = dtfunctions.get_events(request) if events[1]: error = True template_values = {'events':events[0],'error':error, 'logo':logo, 'title': 'šodien' } path = os.path.join(os.path.dirname(__file__),'Templates/base-pub.html') page = template.render(path,template_values) return page
def get(self,timescale): error = False request = dtfunctions.parse_timescale(timescale) events = dtfunctions.get_events(request) if events[1]: error = True template_values = {'events':events[0],'error':error, 'logo':timescale, 'title': TITLES[timescale] } path = os.path.join(os.path.dirname(__file__),'Templates/base-pub.html') page = template.render(path,template_values) self.response.out.write(page)