Skip to content

Commit

Permalink
Fixes #519 by adding return statement
Browse files Browse the repository at this point in the history
  • Loading branch information
bev-a-tron committed Jun 25, 2012
1 parent 9be47f5 commit 1f82d02
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,9 @@ attributes mentioned above::
return log_the_user_in(request.form['username'])
else:
error = 'Invalid username/password'
# this is executed if the request method was GET or the
# credentials were invalid
# the code below this is executed if the request method
# was GET or the credentials were invalid
return render_template('login.html', error=error)

What happens if the key does not exist in the `form` attribute? In that
case a special :exc:`KeyError` is raised. You can catch it like a
Expand Down

0 comments on commit 1f82d02

Please sign in to comment.