Opened 17 years ago
Last modified 17 years ago
#6990 closed
Omit redundant user.is_authenticated check in django/contrib/admin/templates/admin/base.html — at Version 1
Description (last modified by ) ¶
In the admin template:
django/contrib/admin/templates/admin/base.html: {% if user.is_authenticated and user.is_staff %}
While checking if user is staff, it's No need to check if user is authenticated. Since user who is not authenticated can't pass the "user.is_staff" check, so the "user.is_authenticated" check could be omitted.
p.s. may save some precious cpu cycles on Google App Engine. :P
Note:
See TracTickets
for help on using tickets.