<!-- about.html -->
1 {% extends 'book/base.html' %}
2
3 {% block title %} About {% endblock %}
4 {% block extra_head %}
5 <link rel="stylesheet" href="{% static 'css/style.css' %}">
6 {% endblock %}
7 {% block header %}
8 <h1> About Me </h1>
9 {% endblock %}
10 {% block main %}
11 <article>
12 <section> <p>My name is Uyiosasere Idemudia Oduware</p>
13 </section>
14 </article>
15 {% endblock %}
base.html
{% load static %}
<!DOCTYPE html>
<html>
<head>
<title>{% block title %} Uyi's Page {% endblock %}</title>
{% block extra_head %}
{% endblock %}
</head>
<body>
<header>
{% block header %}
{% endblock %}
</header>
<main>
{% block main %}
{% endblock %}
</main>
<footer>
{% block footer %}
{% endblock %}
</footer>
</body>
</html>
my css file is inside LearnSphere/book/static/css/style.css
the base.html and about.html file is inside Learnsphere/book/templates/book/base.html about.html
<!-- about.html -->
1 {% extends 'book/base.html' %}
2
3 {% block title %} About {% endblock %}
4 {% block extra_head %}
5 <link rel="stylesheet" href="{% static 'css/style.css' %}">
6 {% endblock %}
7 {% block header %}
8 <h1> About Me </h1>
9 {% endblock %}
10 {% block main %}
11 <article>
12 <section> <p>My name is Uyiosasere Idemudia Oduware</p>
13 </section>
14 </article>
15 {% endblock %}
base.html
{% load static %}
<!DOCTYPE html>
<html>
<head>
<title>{% block title %} Uyi's Page {% endblock %}</title>
{% block extra_head %}
{% endblock %}
</head>
<body>
<header>
{% block header %}
{% endblock %}
</header>
<main>
{% block main %}
{% endblock %}
</main>
<footer>
{% block footer %}
{% endblock %}
</footer>
</body>
</html>
my css file is inside LearnSphere/book/static/css/style.css
the base.html and about.html file is inside Learnsphere/book/templates/book/base.html about.html
You need to {% load static %}
in each template where it is used. Add it to the top of about.html
instead of base.html
.