diff options
author | Luke Plant <L.Plant.98@cantab.net> | 2010-05-08 14:31:20 +0000 |
---|---|---|
committer | Luke Plant <L.Plant.98@cantab.net> | 2010-05-08 14:31:20 +0000 |
commit | b09581394e7dd7629e71c775d1cc7160b0c26184 (patch) | |
tree | dfb721ed9dc5570a2345b90f1c51798d7cb7ed08 /docs/topics | |
parent | cfc05d8d688f17cdd9827b9fdbfc8770b291c109 (diff) | |
download | django-b09581394e7dd7629e71c775d1cc7160b0c26184.tar.gz |
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
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13135 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/topics')
-rw-r--r-- | docs/topics/auth.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/auth.txt b/docs/topics/auth.txt index bf2d8bf6bd..3041e39705 100644 --- a/docs/topics/auth.txt +++ b/docs/topics/auth.txt @@ -1253,7 +1253,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 %} <p>Welcome, {{ user.username }}. Thanks for logging in.</p> @@ -1288,7 +1288,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 %} <p>You have permission to do something in the foo app.</p> @@ -1361,7 +1361,7 @@ logged-in user and his/her messages are made available in the :ref:`template context <ref-templates-api>` as the template variable ``{{ messages }}``. Here's an example of template code that displays messages: -.. code-block:: html +.. code-block:: html+django {% if messages %} <ul> |