Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #19632 -- Bug in code sample.

Thanks grossmanandy at bfusa com and Simon Charette.
  • Loading branch information...
commit 1dd749284325ea8fe747a3728ed92bafef4ff6a0 1 parent 56f34f9
Aymeric Augustin aaugustin authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  docs/topics/auth/default.txt
2  docs/topics/auth/default.txt
View
@@ -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.