1
0
mirror of https://github.com/django/django.git synced 2025-06-07 12:39:12 +00:00

Fixed #23535 -- Updated tutorial to account for default filter added in 5ea34f3f86.

This commit is contained in:
velis74 2014-09-22 15:40:11 +02:00 committed by Tim Graham
parent 903d144d85
commit 24aa85cea9

View File

@ -511,11 +511,12 @@ template directory in the source code of Django itself
import django import django
print(django.__path__)" print(django.__path__)"
Then, just edit the file and replace ``{{ site_header }}`` with your own Then, just edit the file and replace
site's name as you see fit. We use this approach to teach you how to override ``{{ site_header|default:_('Django administration') }}`` with your own site's
templates. In an actual project, you would probably use the name as you see fit, e.g. ``{{ _('Polls administration') }}``. We use this
:attr:`django.contrib.admin.AdminSite.site_header` attribute to more easily approach to teach you how to override templates. In an actual project, you
make this particular customization. would probably use the :attr:`django.contrib.admin.AdminSite.site_header`
attribute to more easily make this particular customization.
This template file contains lots of text like ``{% block branding %}`` This template file contains lots of text like ``{% block branding %}``
and ``{{ title }}``. The ``{%`` and ``{{`` tags are part of Django's and ``{{ title }}``. The ``{%`` and ``{{`` tags are part of Django's