Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.5.x] Fixed #19632 -- Bug in code sample.

Thanks grossmanandy at bfusa com and Simon Charette.

Backport of 1dd7492.
  • Loading branch information...
commit d90abcc9dad9b239e77aa67bfdd0c431072e2434 1 parent ab6ff2e
@aaugustin aaugustin authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  docs/topics/auth/default.txt
View
2  docs/topics/auth/default.txt
@@ -466,7 +466,7 @@ checks to make sure the user has an email in the desired domain::
from django.contrib.auth.decorators import user_passes_test
def email_check(user):
- return '@example.com' in request.user.email
+ return '@example.com' in user.email
@user_passes_test(email_check)
def my_view(request):
Please sign in to comment.
Something went wrong with that request. Please try again.