From d058a8a104e01d76bd68443787a47a3b58a9913a Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sat, 26 Nov 2005 07:02:59 +0000 Subject: [PATCH] Fixed bug in Python 2.3 example of user_passes_test decorator in docs/authentication.txt git-svn-id: http://code.djangoproject.com/svn/django/trunk@1439 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/authentication.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/authentication.txt b/docs/authentication.txt index 475595e972..c1d8694499 100644 --- a/docs/authentication.txt +++ b/docs/authentication.txt @@ -299,7 +299,7 @@ As a shortcut, you can use the convenient ``user_passes_test`` decorator:: def my_view(request): # ... - my_view = user_passes_test(my_view, lambda u: u.has_perm('polls.can_vote')) + my_view = user_passes_test(lambda u: u.has_perm('polls.can_vote'))(my_view) Here's the same thing, using Python 2.4's decorator syntax::