summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/auth.txt6
1 files changed, 3 insertions, 3 deletions
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 %}
<p>Welcome, {{ user.username }}. Thanks for logging in.</p>
@@ -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 %}
<p>You have permission to do something in the foo app.</p>
@@ -1333,7 +1333,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>