From 1dd749284325ea8fe747a3728ed92bafef4ff6a0 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Fri, 18 Jan 2013 20:50:12 +0100 Subject: [PATCH] Fixed #19632 -- Bug in code sample. Thanks grossmanandy at bfusa com and Simon Charette. --- docs/topics/auth/default.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt index d1463c645b..569738569d 100644 --- a/docs/topics/auth/default.txt +++ b/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):