Django

Code

Changeset 1439

Show
Ignore:
Timestamp:
11/26/05 01:02:59 (3 years ago)
Author:
adrian
Message:

Fixed bug in Python 2.3 example of user_passes_test decorator in docs/authentication.txt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/authentication.txt

    r1327 r1439  
    300300    def my_view(request): 
    301301        # ... 
    302     my_view = user_passes_test(my_view, lambda u: u.has_perm('polls.can_vote')
     302    my_view = user_passes_test(lambda u: u.has_perm('polls.can_vote'))(my_view
    303303 
    304304Here's the same thing, using Python 2.4's decorator syntax::