diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-12-24 04:39:59 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-12-24 04:39:59 +0000 |
| commit | 49fd163a95074c07a23f2ccf9e23aebf5bee0bb2 (patch) | |
| tree | 78ca0957bfc75f190e34d218c7d0eba33afb5d49 /docs/authentication.txt | |
| parent | d9269055c941bd864049207441d7955ec65760fe (diff) | |
Fixed #925 -- Added TEMPLATE_CONTEXT_PROCESSORS, which lets you specify processesors for DjangoContext. Thanks, Luke Plant
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/authentication.txt')
| -rw-r--r-- | docs/authentication.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/authentication.txt b/docs/authentication.txt index d31e2ced79..3fdae3adde 100644 --- a/docs/authentication.txt +++ b/docs/authentication.txt @@ -438,6 +438,15 @@ Authentication data in templates The currently logged-in user and his/her permissions are made available in the `template context`_ when you use ``DjangoContext``. +.. admonition:: Technicality + + Technically, these variables are only made available in the template context + if you use ``DjangoContext`` *and* your ``TEMPLATE_CONTEXT_PROCESSORS`` + setting contains ``"django.core.context_processors.auth"``, which is default. + For more, see the `DjangoContext docs`_. + + .. _DjangoContext docs: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-djangocontext + Users ----- @@ -454,7 +463,7 @@ Permissions ----------- The currently logged-in user's permissions are stored in the template variable -``{{ perms }}``. This is an instance of ``django.core.extensions.PermWrapper``, +``{{ perms }}``. This is an instance of ``django.core.context_processors.PermWrapper``, which is a template-friendly proxy of permissions. In the ``{{ perms }}`` object, single-attribute lookup is a proxy to |
