summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurilo Opsfelder Araujo <mopsfelder@gmail.com>2015-09-21 22:11:00 -0300
committerMurilo Opsfelder Araujo <mopsfelder@gmail.com>2015-09-21 22:11:00 -0300
commitc70ae2feae917f4722f3eb5f7b5ad9a8a850833d (patch)
treeb00879533fb7b9f8b8074e1906ac1614757584a0
parentf0048f8d03be4d73a3d4ac6384795c92e9e1cc1e (diff)
downloadcherrypy-c70ae2feae917f4722f3eb5f7b5ad9a8a850833d.tar.gz
docs/basics.rst: Update validate_password() to take 3 arguments
This change updates the sample validate_password() function since it actually receives 3 arguments when called, i.e. realm, username and password. Without this change, the following exception is raised: TypeError: validate_password() takes exactly 2 arguments (3 given)
-rw-r--r--docs/basics.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/basics.rst b/docs/basics.rst
index 4b6ebd54..b1896f22 100644
--- a/docs/basics.rst
+++ b/docs/basics.rst
@@ -759,7 +759,7 @@ SSL or within a closed network.
USERS = {'jon': 'secret'}
- def validate_password(username, password):
+ def validate_password(realm, username, password):
if username in USERS and USERS[username] == password:
return True
return False