Changes between Initial Version and Version 1 of Ticket #6991
- Timestamp:
- Jun 16, 2008, 3:51:17 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #6991 – Description
initial v1 1 django/contrib/admin/views/decorators.py: if request.user.is_authenticated() and request.user.is_staff: 1 {{{ 2 django/contrib/admin/views/decorators.py: 3 if request.user.is_authenticated() and request.user.is_staff: 4 }}} 2 5 3 ### COMMENT: request.user.is_staff is True implied that request.user.is_authenticated() is True, so request.user.is_authenticated()could be omitted.6 ### COMMENT: {{{request.user.is_staff is True}}} implied that {{{request.user.is_authenticated()}}} is True, so {{{request.user.is_authenticated()}}} could be omitted. 4 7 5 docs/authentication.txt: if not (request.user.is_authenticated() and request.user.has_perm('polls.can_vote')): 8 {{{ 9 docs/authentication.txt: 10 if not (request.user.is_authenticated() and request.user.has_perm('polls.can_vote')): 11 }}} 6 12 7 ### COMMENT: request.user.has_perm('polls.can_vote') is True implied that request.user.is_authenticated() is True, so request.user.is_authenticated()could be omitted.13 ### COMMENT: {{{request.user.has_perm('polls.can_vote') is True}}} implied that {{{request.user.is_authenticated()}}} is True, so {{{request.user.is_authenticated()}}} could be omitted. 8 14 9 15 p.s. may save some precious cpu cycles on Google App Engine. :P