Complete the code to extend the base template in Django.
{% extends '[1]' %}
{% block content %}
<p>Welcome to the homepage!</p>
{% endblock %}The {% extends %} tag is used to inherit from a base template. Here, base.html is the common base template.
Complete the code to define a block named 'content' in the base template.
<body>
{% block [1] %}
<!-- Default content -->
{% endblock %}
</body>The {% block %} tag defines a section that child templates can override. Here, the block is named content.
Fix the error in the child template to correctly override the 'content' block.
{% extends 'base.html' %}
{% block [1] %}
<h1>Hello, world!</h1>
{% endblock %}The child template must use the exact block name content to override the base template's block.
Fill both blanks to create a base template with a block named 'title' and a block named 'content'.
<html>
<head>
<title>{% block [1] %}My Site{% endblock %}</title>
</head>
<body>
{% block [2] %}
<p>Welcome!</p>
{% endblock %}
</body>
</html>The base template defines a title block for the page title and a content block for the main body content.
Fill all three blanks to create a child template that extends 'base.html', overrides the 'title' block with 'Home Page', and overrides the 'content' block with a welcome message.
{% extends '[1]' %}
{% block [2] %}Home Page{% endblock %}
{% block [3] %}
<p>Welcome to the home page!</p>
{% endblock %}The child template extends base.html, overrides the title block with 'Home Page', and overrides the content block with a welcome message.