I just finished the Flask basic tutorial (here) and even though I\'ve done completed every step, when I am trying
python flaskr.py
what I get
You put your app.run()
call too early:
if __name__== '__main__':
app.run()
This is executed before any of your routes are registered. Move these two lines to the end of your file.
Next, you have the first line in show_entries()
is incorrect:
def show_entries():
db_get_db()
There is no db_get_db()
function; this should be db = get_db()
instead.