Clarified custom header instructions in tutorial 2.

This commit is contained in:
Collin Anderson 2014-12-26 16:48:18 -06:00 committed by Tim Graham
parent c2e419c267
commit 0821b3d53c
1 changed files with 3 additions and 1 deletions

View File

@ -519,11 +519,13 @@ template directory in the source code of Django itself
Then, just edit the file and replace Then, just edit the file and replace
``{{ site_header|default:_('Django administration') }}`` (including the curly ``{{ site_header|default:_('Django administration') }}`` (including the curly
braces) with your own site's name as you see fit. You should end up with braces) with your own site's name as you see fit. You should end up with
a line like: a section of code like:
.. code-block:: html+django .. code-block:: html+django
{% block branding %}
<h1 id="site-name"><a href="{% url 'admin:index' %}">Polls Administration</a></h1> <h1 id="site-name"><a href="{% url 'admin:index' %}">Polls Administration</a></h1>
{% endblock %}
We use this approach to teach you how to override templates. In an actual We use this approach to teach you how to override templates. In an actual
project, you would probably use project, you would probably use