summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-07-03 02:12:59 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-07-03 02:12:59 +0000
commit435e8910ae2ecbf49b585c0caf4994b3a78acdb0 (patch)
tree263d28d62b7357c10cc066fbadf71a20c5f389a4
parent37aeabe71f0dd96b7d8cce99487f2a42a7d733be (diff)
Small edits to comments in contrib/auth/__init__.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3257 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/auth/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/contrib/auth/__init__.py b/django/contrib/auth/__init__.py
index dde7ea5c9c..2150893022 100644
--- a/django/contrib/auth/__init__.py
+++ b/django/contrib/auth/__init__.py
@@ -27,17 +27,17 @@ def get_backends():
def authenticate(**credentials):
"""
- If the given credentials, return a user object.
+ If the given credentials are valid, return a User object.
"""
for backend in get_backends():
try:
user = backend.authenticate(**credentials)
except TypeError:
- # this backend doesn't accept these credentials as arguments, try the next one.
+ # This backend doesn't accept these credentials as arguments. Try the next one.
continue
if user is None:
continue
- # annotate the user object with the path of the backend
+ # Annotate the user object with the path of the backend.
user.backend = str(backend.__class__)
return user
@@ -54,7 +54,7 @@ def login(request, user):
def logout(request):
"""
- Remove the authenticated user's id from request.
+ Remove the authenticated user's ID from the request.
"""
del request.session[SESSION_KEY]
del request.session[BACKEND_SESSION_KEY]