diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2006-07-19 02:09:26 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2006-07-19 02:09:26 +0000 |
| commit | 51705f60b1b561b3e44d1ff3d02bc12d7af26d9f (patch) | |
| tree | 6851e452daf82d75b2265338360edfc7dac9b196 /django/contrib/admin/templates | |
| parent | 533594d1a5a943ef80360762d5c5d021975a9bde (diff) | |
Fixed #2332 -- Introduced is_authenticated() method on User and AnonymousUser classes. Recommended its use over is_anonymous in the docs. Changed internal Django use to match this recommendation. Thanks to SmileyChris and Gary Wilson for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3360 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/admin/templates')
| -rw-r--r-- | django/contrib/admin/templates/admin/base.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/admin/templates/admin/base.html b/django/contrib/admin/templates/admin/base.html index 114f98c369..41514e6a81 100644 --- a/django/contrib/admin/templates/admin/base.html +++ b/django/contrib/admin/templates/admin/base.html @@ -20,9 +20,9 @@ <div id="branding"> {% block branding %}{% endblock %} </div> - {% if not user.is_anonymous %}{% if user.is_staff %} + {% if user.is_authenticated and user.is_staff %} <div id="user-tools">{% trans 'Welcome,' %} <strong>{% if user.first_name %}{{ user.first_name|escape }}{% else %}{{ user.username }}{% endif %}</strong>. {% block userlinks %}<a href="doc/">{% trans 'Documentation' %}</a> / <a href="password_change/">{% trans 'Change password' %}</a> / <a href="logout/">{% trans 'Log out' %}</a>{% endblock %}</div> - {% endif %}{% endif %} + {% endif %} {% block nav-global %}{% endblock %} </div> <!-- END Header --> |
