File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -512,11 +512,18 @@ template directory in the source code of Django itself
512
512
print(django.__path__)"
513
513
514
514
Then, just edit the file and replace
515
- ``{{ site_header|default:_('Django administration') }}`` with your own site's
516
- name as you see fit, e.g. ``{{ _('Polls administration') }}``. We use this
517
- approach to teach you how to override templates. In an actual project, you
518
- would probably use the :attr:`django.contrib.admin.AdminSite.site_header`
519
- attribute to more easily make this particular customization.
515
+ ``{{ site_header|default:_('Django administration') }}`` (including the curly
516
+ braces) with your own site's name as you see fit. You should end up with
517
+ a line like:
518
+
519
+ .. code-block:: html+django
520
+
521
+ <h1 id="site-name"><a href="{% url 'admin:index' %}">Polls Administration</a></h1>
522
+
523
+ We use this approach to teach you how to override templates. In an actual
524
+ project, you would probably use
525
+ the :attr:`django.contrib.admin.AdminSite.site_header` attribute to more easily
526
+ make this particular customization.
520
527
521
528
This template file contains lots of text like ``{% block branding %}``
522
529
and ``{{ title }}``. The ``{%`` and ``{{`` tags are part of Django's
You can’t perform that action at this time.
0 commit comments