diff options
Diffstat (limited to 'docs/quick_tutorial/authorization')
| -rw-r--r-- | docs/quick_tutorial/authorization/development.ini | 4 | ||||
| -rw-r--r-- | docs/quick_tutorial/authorization/setup.py | 1 | ||||
| -rw-r--r-- | docs/quick_tutorial/authorization/tutorial/views.py | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/docs/quick_tutorial/authorization/development.ini b/docs/quick_tutorial/authorization/development.ini index a4586d45f..cae509542 100644 --- a/docs/quick_tutorial/authorization/development.ini +++ b/docs/quick_tutorial/authorization/development.ini @@ -6,5 +6,5 @@ pyramid.includes = tutorial.secret = 98zd [server:main] -use = egg:pyramid#wsgiref -port = 6543 +use = egg:waitress#main +listen = localhost:6543 diff --git a/docs/quick_tutorial/authorization/setup.py b/docs/quick_tutorial/authorization/setup.py index 7a6ff4226..808a6f9a9 100644 --- a/docs/quick_tutorial/authorization/setup.py +++ b/docs/quick_tutorial/authorization/setup.py @@ -2,6 +2,7 @@ from setuptools import setup requires = [ 'pyramid', + 'waitress', 'pyramid_chameleon', 'bcrypt' ] diff --git a/docs/quick_tutorial/authorization/tutorial/views.py b/docs/quick_tutorial/authorization/tutorial/views.py index b2dc905c0..3876efb1c 100644 --- a/docs/quick_tutorial/authorization/tutorial/views.py +++ b/docs/quick_tutorial/authorization/tutorial/views.py @@ -45,7 +45,8 @@ class TutorialViews: if 'form.submitted' in request.params: login = request.params['login'] password = request.params['password'] - if check_password(password, USERS.get(login)): + hashed_pw = USERS.get(login) + if hashed_pw and check_password(password, hashed_pw): headers = remember(request, login) return HTTPFound(location=came_from, headers=headers) |
