Skip to content

Commit

Permalink
Chapter 5: Shell context (5c)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Nov 14, 2017
1 parent da7b613 commit 1681afb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hello.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ class NameForm(FlaskForm):
submit = SubmitField('Submit')


@app.shell_context_processor
def make_shell_context():
return dict(db=db, User=User, Role=Role)


@app.errorhandler(404)
def page_not_found(e):
return render_template('404.html'), 404
Expand Down

0 comments on commit 1681afb

Please sign in to comment.