Ticket #9980: requestcontext_auth_user.diff

File requestcontext_auth_user.diff, 1.0 KB (added by Jeff Anderson, 16 years ago)

"Nice correction", slightly modified, in patch format

  • docs/topics/auth.txt

    diff --git a/docs/topics/auth.txt b/docs/topics/auth.txt
    index 9759ed8..b10780b 100644
    a b The currently logged-in user and his/her permissions are made available in the  
    11251125Users
    11261126-----
    11271127
    1128 The currently logged-in user, either a
    1129 :class:`~django.contrib.auth.models.User` instance or an
    1130 :class:`~django.contrib.auth.models.AnonymousUser` instance, is stored in the
    1131 template variable ``{{ user }}``:
     1128When rendering a template :class:`~django.template.context.RequestContext`, the
     1129currently logged-in user, either a  :class:`~django.contrib.auth.models.User`
     1130instance or an :class:`~django.contrib.auth.models.AnonymousUser` instance, is
     1131stored in the template variable ``{{ user }}``:
    11321132
    11331133.. code-block:: html
    11341134
    template variable ``{{ user }}``:  
    11381138        <p>Welcome, new user. Please log in.</p>
    11391139    {% endif %}
    11401140
     1141This template context variable is not available if a ``RequestContext`` is not
     1142being used.
     1143
    11411144Permissions
    11421145-----------
    11431146
Back to Top