From 49fd163a95074c07a23f2ccf9e23aebf5bee0bb2 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sat, 24 Dec 2005 04:39:59 +0000 Subject: 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 --- docs/authentication.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'docs/authentication.txt') 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 -- cgit v1.3