def render_list_handler(): from templates.render_list import page return page.render()
def static_files_handler(): from templates.static_files import page return page.render()
def star_wars_handler(): from templates.star_wars import page json_filename = os.path.join(app.static_folder, 'sw-people.json') with open(json_filename, 'r') as f: people = json.load(f)['characters'] return page.render(characters=people)
def hello_world_handler(): from templates.hello_world import page return page.render()
def star_wars_handler(): from templates.star_wars import page with open('sw-people.json', 'r') as f: people = list(json.load(f).values()) return page.render(characters=people)
def css_handler(): from templates.css_example import page return page.render()
def table_handler(): from templates.table_example import page return page.render()