Esempio n. 1
0
def render_list_handler():
    from templates.render_list import page
    return page.render()
Esempio n. 2
0
def static_files_handler():
    from templates.static_files import page
    return page.render()
Esempio n. 3
0
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)
Esempio n. 4
0
def hello_world_handler():
    from templates.hello_world import page
    return page.render()
Esempio n. 5
0
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)
Esempio n. 6
0
def css_handler():
    from templates.css_example import page
    return page.render()
Esempio n. 7
0
def table_handler():
    from templates.table_example import page
    return page.render()