In template 'endblock'. Did you forget to register or load this tag?

I'm new to python and working and following a book tutorial, but I keep getting the same error.

TemplateSyntaxError at /

Invalid block tag on line 8: 'endblock'. Did you forget to register or load this tag?

Request Method:     GET
Request URL:    http://127.0.0.1:8000/
Django Version:     4.0.7
Exception Type:     TemplateSyntaxError
Exception Value:    

Invalid block tag on line 8: 'endblock'. Did you forget to register or load this tag?

Exception Location:     /Users/dej/Desktop/code/news/.venv/lib/python3.10/site-packages/django/template/base.py, line 568, in invalid_block_tag
Python Executable:  /Users/dej/Desktop/code/news/.venv/bin/python
Python Version:     3.10.6
Python Path:    

['/Users/dej/Desktop/code/news',
 '/Library/Frameworks/Python.framework/Versions/3.10/lib/python310.zip',
 '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10',
 '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/lib-dynload',
 '/Users/derrellj/Desktop/code/news/.venv/lib/python3.10/site-packages']

Server time:    Tue, 30 Aug 2022 15:41:36 +0000

################ here is my templates/home.html file....

{% extends "base.html" %} {% block title %}Home{% endblock title %} {% block
content %} {% if user.is_authenticated %} Hi {{ user.username }}!
<p><a href="{% url 'logout' %}">Log Out</a></p>
{% else %}
<p>You are not logged in</p>
<a href="{% url 'login' %}">Log In</a> |
<a href="{% url 'signup' %}">Sign Up</a>
{% endif %} {% endblock content %}
can anyone help me solve this problem

There need only {% endblock %} as {% block title %}title{% endblock %}

Back to Top