mirror of
https://github.com/django/django.git
synced 2025-08-19 10:10:42 +00:00
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
This commit is contained in:
parent
37a0c110e2
commit
d058a8a104
1 changed files with 1 additions and 1 deletions
|
@ -299,7 +299,7 @@ As a shortcut, you can use the convenient ``user_passes_test`` decorator::
|
||||||
|
|
||||||
def my_view(request):
|
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::
|
Here's the same thing, using Python 2.4's decorator syntax::
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue