Browse Source

[5.0.x] Refs #33690 -- Updated tutorial for admin dark mode toggle.

Backport of c65f49d3cb8709f2f694f78b4849bc7693e90416 from main
Adam Johnson 1 year ago
parent
commit
ef8234aef8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      docs/intro/tutorial07.txt

+ 3 - 0
docs/intro/tutorial07.txt

@@ -368,6 +368,9 @@ a section of code like:
 
     {% block branding %}
     <div id="site-name"><a href="{% url 'admin:index' %}">Polls Administration</a></div>
+    {% if user.is_anonymous %}
+      {% include "admin/color_theme_toggle.html" %}
+    {% endif %}
     {% endblock %}
 
 We use this approach to teach you how to override templates. In an actual