Following Flaskr tutorial, up to step 6