From d5ed0302289db2a8b64ebd29ca1081dab364d1ee Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Sat, 8 May 2010 20:31:59 +0000 Subject: [1.1.X] Added hyperlinks for builtin template tags and filters to code samples in docs. Implemented in javascript because doing it 'properly' is pretty much impossible with Sphinx and Pygments. Refs #12249 Backport of [13135] from trunk git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@13137 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/topics/auth.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/topics') diff --git a/docs/topics/auth.txt b/docs/topics/auth.txt index cfb796988c..7f9252db81 100644 --- a/docs/topics/auth.txt +++ b/docs/topics/auth.txt @@ -1230,7 +1230,7 @@ currently logged-in user, either a :class:`~django.contrib.auth.models.User` instance or an :class:`~django.contrib.auth.models.AnonymousUser` instance, is stored in the template variable ``{{ user }}``: -.. code-block:: html +.. code-block:: html+django {% if user.is_authenticated %}

Welcome, {{ user.username }}. Thanks for logging in.

@@ -1265,7 +1265,7 @@ would display ``True`` if the logged-in user had the permission Thus, you can check permissions in template ``{% if %}`` statements: -.. code-block:: html +.. code-block:: html+django {% if perms.foo %}

You have permission to do something in the foo app.

@@ -1333,7 +1333,7 @@ logged-in user and his/her messages are made available in the :ref:`template context ` as the template variable ``{{ messages }}``. Here's an example of template code that displays messages: -.. code-block:: html +.. code-block:: html+django {% if messages %}