Loading docs/intro/tutorial02.txt +6 −5 Original line number Diff line number Diff line Loading @@ -511,11 +511,12 @@ template directory in the source code of Django itself import django print(django.__path__)" Then, just edit the file and replace ``{{ site_header }}`` with your own site's name as you see fit. We use this approach to teach you how to override templates. In an actual project, you would probably use the :attr:`django.contrib.admin.AdminSite.site_header` attribute to more easily make this particular customization. Then, just edit the file and replace ``{{ site_header|default:_('Django administration') }}`` with your own site's name as you see fit, e.g. ``{{ _('Polls administration') }}``. We use this approach to teach you how to override templates. In an actual project, you 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 %}`` and ``{{ title }}``. The ``{%`` and ``{{`` tags are part of Django's Loading Loading
docs/intro/tutorial02.txt +6 −5 Original line number Diff line number Diff line Loading @@ -511,11 +511,12 @@ template directory in the source code of Django itself import django print(django.__path__)" Then, just edit the file and replace ``{{ site_header }}`` with your own site's name as you see fit. We use this approach to teach you how to override templates. In an actual project, you would probably use the :attr:`django.contrib.admin.AdminSite.site_header` attribute to more easily make this particular customization. Then, just edit the file and replace ``{{ site_header|default:_('Django administration') }}`` with your own site's name as you see fit, e.g. ``{{ _('Polls administration') }}``. We use this approach to teach you how to override templates. In an actual project, you 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 %}`` and ``{{ title }}``. The ``{%`` and ``{{`` tags are part of Django's Loading