Invalid block tag : 'endblock'. Did you forget to register or load this tag?
You simply have typos.
You should have {%
not { %
, and you got those typos in both of templates.
So you need to have
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{% block title %}{% endblock %}</title>
</head>
<body>
{% block content %} {% endblock %}
</body>
</html>
and
{% extends "layout/layout1.html"%}
{% block title %}The Video page{% endblock %}
{% block content %}
<h1>This is a html</h1>
<p>This is a p tag</p>
<a href="http://www.noobmovies.com">Click me!</a>
<img src="https://upload.wikimedia.org/wikipedia/en/7/72/Anthony_Raneri.jpg"/>
{% endblock %}
NOTE: don't forget about identations in html files, it makes code more readable.
If none of the previous answers worked for you, try the following:
You are most likely using a base.html file and have the static css being loaded on the top {% load static %}
and the problem for me was that I needed to also load this in my other template file.
I'm using Django 2.0.3 and this solved the issue for me.
For me it was emacs breaking the lines up when I copied the template over, so
{% endif
was on one line and
%}
was on the next line. These need to be together on one line, and
{{ variable_name }}
too.
Django didn't recognise your starting block tag, because you have a space between the {
and the %
.
You also have the same error in both start and end tags in the other template file.